Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rafaelgss/function-perf
Measure the performance of an function easily
https://github.com/rafaelgss/function-perf
Last synced: 12 days ago
JSON representation
Measure the performance of an function easily
- Host: GitHub
- URL: https://github.com/rafaelgss/function-perf
- Owner: RafaelGSS
- Created: 2020-06-29T23:42:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-13T12:03:36.000Z (5 months ago)
- Last Synced: 2024-11-01T12:52:02.200Z (19 days ago)
- Language: TypeScript
- Homepage:
- Size: 331 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# perf-function
Measure the performance of an function easily
![Node.js CI](https://github.com/RafaelGSS/function-perf/workflows/Node.js%20CI/badge.svg?branch=master)
## Installation
This is a [Node.js](https://nodejs.org/) module available through the
[npm registry](https://www.npmjs.com/). It can be installed using the
[`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)
or
[`yarn`](https://yarnpkg.com/en/)
command line tools.```sh
npm install function-perf --save
```## Usage
```ts
import { Measure } from 'function-perf';class Example {
@Measure({ asyncFunction: true })
async asyncFunctionToMeasure() {
// ...
}@Measure()
functionToMeasure() {
// ...
}
}
```run `demo.ts` to complete usage
## Tests
```sh
npm install
npm test
```## Dependencies
None
## Dev Dependencies
- [@types/node](https://ghub.io/@types/node): TypeScript definitions for Node.js
## License
MIT