Class: Metrics

Metrics

new Metrics()

The metrics class used to store details about operations.
Source:

Methods

clear() → {Metrics}

Clears all logged operations.
Source:
Returns:
Type
Metrics

create(name) → {Operation}

Creates an operation within the metrics instance and if metrics are currently enabled (by calling the start() method) the operation is also stored in the metrics log.
Parameters:
Name Type Description
name String The name of the operation.
Source:
Returns:
Type
Operation

list() → {Array}

Returns an array of all logged operations.
Source:
Returns:
Type
Array

start() → {Metrics}

Starts logging operations.
Source:
Returns:
Type
Metrics

stop() → {Metrics}

Stops logging operations.
Source:
Returns:
Type
Metrics