Package com.yahoo.vespa.curator.stats
Class LatencyStats
java.lang.Object
com.yahoo.vespa.curator.stats.LatencyStats
An instance of
LatencyStats
keeps track of statistics related to time intervals that
start at a particular moment in time and ends at a later time. A typical example is the processing of
requests: Each newly received request starts a new interval, and ends when the response is sent.
The statistics only applies to the current time period, and can be retrieved as a
LatencyMetrics
instance from e.g. getLatencyMetrics()
. This fits well with how Yamas
works: it collects metrics since last collection every minute or so.
- Author:
- hakon
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCreates an empty LatencyStats starting the first time period now. -
Method Summary
Modifier and TypeMethodDescriptionReturns the metrics for the current time period up to now.Returns the metrics for the current time period up to now, and starts a new period.Starts a new (active) interval.
-
Constructor Details
-
LatencyStats
public LatencyStats()Creates an empty LatencyStats starting the first time period now.
-
-
Method Details
-
startNewInterval
Starts a new (active) interval. The caller MUST callLatencyStats.ActiveInterval.close()
on the returned instance exactly once, which will end the interval. -
getLatencyMetrics
Returns the metrics for the current time period up to now. -
getLatencyMetricsAndStartNewPeriod
Returns the metrics for the current time period up to now, and starts a new period.
-