marky-decorator
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

marky-decorator NPM Build Status

A method-decorator for marky to easily measure a method's performance.

Usage

npm install --save marky-decorator
class MyClass {
  // the measurement reference name will equal the method name
  @measure()
  public myMethod() {
    // do some tasks
  }

  @measure('custom_measurement_identifier')
  public anotherMethod() {
    // ...
  }
}

const myInstance = new MyClass();
// this will call marky.mark() before and marky.stop() after the method
myInstance.myMethod();

Reference: https://github.com/nolanlawson/marky

Package Sidebar

Install

npm i marky-decorator

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.82 kB

Total Files

7

Last publish

Collaborators

  • andreas.mueller