1.0.3 • Published 5 years ago
marky-decorator v1.0.3
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