marky-decorator
v1.0.3
Published
A decorator interface for the marky performance measurement library
Downloads
8
Maintainers
Readme
marky-decorator
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