Class PartialAggregation
java.lang.Object
io.github.resilience4j.core.metrics.PartialAggregation
- All Implemented Interfaces:
CumulativeMeasurement,MeasurementData
-
Method Summary
Modifier and TypeMethodDescriptionlongintReturns the total number of all calls in this measurement.intReturns the number of failed calls in this measurement.intReturns the number of calls in this measurement which were slower than a certain threshold.intReturns the number of failed calls in this measurement which were slower than a certain threshold.longReturns the total duration of all calls in this measurement.voidrecord(long duration, TimeUnit durationUnit, Metrics.Outcome outcome) Records a call duration and its outcome.
-
Method Details
-
getEpochSecond
public long getEpochSecond() -
getTotalDurationInMillis
public long getTotalDurationInMillis()Description copied from interface:MeasurementDataReturns the total duration of all calls in this measurement.- Specified by:
getTotalDurationInMillisin interfaceMeasurementData- Returns:
- the total duration of all calls
-
getNumberOfSlowCalls
public int getNumberOfSlowCalls()Description copied from interface:MeasurementDataReturns the number of calls in this measurement which were slower than a certain threshold.- Specified by:
getNumberOfSlowCallsin interfaceMeasurementData- Returns:
- the number of calls which were slower than a certain threshold
-
getNumberOfSlowFailedCalls
public int getNumberOfSlowFailedCalls()Description copied from interface:MeasurementDataReturns the number of failed calls in this measurement which were slower than a certain threshold.- Specified by:
getNumberOfSlowFailedCallsin interfaceMeasurementData- Returns:
- the number of failed calls which were slower than a certain threshold
-
getNumberOfFailedCalls
public int getNumberOfFailedCalls()Description copied from interface:MeasurementDataReturns the number of failed calls in this measurement.- Specified by:
getNumberOfFailedCallsin interfaceMeasurementData- Returns:
- the number of failed calls
-
getNumberOfCalls
public int getNumberOfCalls()Description copied from interface:MeasurementDataReturns the total number of all calls in this measurement.- Specified by:
getNumberOfCallsin interfaceMeasurementData- Returns:
- the total number of all calls
-
record
Description copied from interface:CumulativeMeasurementRecords a call duration and its outcome.- Specified by:
recordin interfaceCumulativeMeasurement- Parameters:
duration- the call durationdurationUnit- the time unit of the call durationoutcome- the outcome of the call
-