A simple, zero-config wrapper for measuring the runtime of synchronous and asynchronous functions.
Install timerify
via npm:
npm install timerify
Wrap a function to measure its runtime:
import { timerify } from 'timerify';
const slow = timerify(async () => await fetch(url), 'fetch');
await slow();
Measure the runtime of a function via the command line:
npx timerify src/job.ts runJob
- Zero-Config: No setup required; just wrap your function and measure.
- Sync/Async Support: Works with both synchronous and asynchronous functions.
- CLI Integration: Run measurements directly from the command line.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
If you encounter issues or have questions, file an issue on the GitHub repository.