# Class: Metrics

## Metrics

#### new Metrics()

The metrics class used to store details about operations.

Source:
  - Metrics.js, line 10

### Methods

- clear() → {Metrics}
- create(name) → {Operation}
- list() → {Array}
- start() → {Metrics}
- stop() → {Metrics}

#### clear() → {Metrics}

Clears all logged operations.

Source:
  - Metrics.js, line 60

##### 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:
  - Metrics.js, line 28

##### Returns:

Type
  Operation

#### list() → {Array}

Returns an array of all logged operations.

Source:
  - Metrics.js, line 69

##### Returns:

Type
  Array

#### start() → {Metrics}

Starts logging operations.

Source:
  - Metrics.js, line 42

##### Returns:

Type
  Metrics

#### stop() → {Metrics}

Stops logging operations.

Source:
  - Metrics.js, line 51

##### Returns:

Type
  Metrics