new CBStats(options)
Circuit breaker statistics
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Methods
-
add(intervals)
-
Add intervals emitted by the
CircuitBreaker#event:intervalevent.Parameters:
Name Type Description intervalsArray.<object> Array of
CircuitBreaker#event:intervalinstances -
getSummary() → {CBStats~Summary}
-
Get statistics summary
Returns:
stats
- Type
- CBStats~Summary
Type Definitions
-
CountsSummary
-
Type:
- object
-
HealthSummary
-
- Source:
Properties:
Name Type Description totalinteger Total amount of calls
successinteger Total amount of successful calls
totalErrorsinteger Total errors
timeoutsinteger Total amount of TimeoutError errors
rejectedinteger Total amount of OpenCircuitError errors
otherErrorsinteger Total amount of errors which are neither timeouts nor rejections
errorsobject Total error counts by name
callRatefloat Calls per second
activeinteger Current active calls
queuedinteger Current queued calls
-
Summary
-
Type:
- object
- Source:
Properties:
Name Type Description timesCBStats~TimesSummary Times summary
countsCBStats~CountsSummary Cummulative counts summary
healthCBStats~HealthSummary Health summary
-
TimesSummary
-
Type:
- object