Class that measures the energy spent when executing a section of code.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionalfilename: string

    Returns energy

Properties

filename: undefined | string
print: boolean
printUnit: boolean

Methods

  • Verifies that join point start is not undefined, that it is inside a function. Additionally, if $end is not undefined, checks if it is inside the same function as $start.

    [Requires] global attribute 'ancestor'.

    Parameters

    • Optional$start: any
    • Optional$end: any
    • OptionalfunctionJpName: string

    Returns boolean

    True if $start is a valid join point for the 'measure' function

  • Parameters

    • print: boolean

    Returns this

  • If true, suffixes 'J' to the end of the value.

    Parameters

    • printUnit: boolean

    Returns this