RafaelGSS / function-perf

Measure the performance of an function easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

perf-function

Measure the performance of an function easily

Node.js CI

Installation

This is a Node.js module available through the npm registry. It can be installed using the npm or yarn command line tools.

npm install function-perf --save

Usage

import { Measure } from 'function-perf';

class Example {

  @Measure({ asyncFunction: true })
  async asyncFunctionToMeasure() {
    // ...
  }

  @Measure()
  functionToMeasure() {
    // ...
  }
}

run demo.ts to complete usage

Tests

npm install
npm test

Dependencies

None

Dev Dependencies

License

MIT

About

Measure the performance of an function easily


Languages

Language:TypeScript 94.0%Language:JavaScript 6.0%