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
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.