log-execution-time

1.0.2 • Public • Published

Log method execution time decorator

Log method execution time decorator using Nodejs performance hook

Install

npm install log-execution-time --save-dev

Example

import {LogExecutionTime} from 'log-execution-time';

class Person {
    public age = 10

    @LogExecutionTime
    isAdult() {
        return this.age > 18
    }
}

let person = new Person();
person.isAdult();

// functino isAdult(): 0.0001s

/log-execution-time/

    Package Sidebar

    Install

    npm i log-execution-time

    Weekly Downloads

    1

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    12.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • hastalavistababy