- Description:
Metrics library
- Source:
Members
(static) Counter :Counter
- Source:
(static) FakeTrace :FakeTrace
- Source:
(static) Histogram :Histogram
- Source:
(static) Meter :Meter
- Source:
(static) Timer :Timer
- Source:
(static) TokenBucket :TokenBucket
- Source:
(static) Trace :Trace
- Source:
Methods
(static) incr(obj, name, coountopt) → {number}
- Description:
Increments a counter in an object, creates a new var if not exist or not a number
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
obj |
object | |||
name |
string | |||
coount |
number |
<optional> |
1
|
Returns:
| Type | Description |
|---|---|
| number |
(static) take(obj, name) → {number}
- Description:
Return the value for the given var and resets it to 0
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
object | |
name |
string |
Returns:
| Type | Description |
|---|---|
| number |
(static) toJSON()
- Description:
Convert all metrics for all propeties. Options:
- reset - true to reset all metrics
- take - regexp for variable that should use
takei.e. resetable counters - skip - regexp of properties to ignore
- Source: