Package org.eso.ias.plugin
Class DetailedStatsCollector
java.lang.Object
org.eso.ias.plugin.DetailedStatsCollector
Collects detailed statistics about updated of monitor point values.
This objects is notified about every monitor point update received by the plugin from the
monitored system..
When requested, the plugin submits a log with the statistics collected so far
and get ready for the next time interval where a time interval is whatever time is
between two consecutive calls of getAndReset()
.
If there has been no update in the last time interval, no message is logged.
- Author:
- acaproni
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
The data to collect for each monitor point -
Field Summary
Modifier and TypeFieldDescriptionstatic final org.slf4j.Logger
The loggerstatic final int
The number of monitor points to log -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the 10 most frequently updated monitor pointsLogs the message and get ready for the next iteration period.void
mPointUpdated
(String id) A monitor point with the given ID has been update
-
Field Details
-
MONITOR_POINTS_TO_LOG
public static final int MONITOR_POINTS_TO_LOGThe number of monitor points to log- See Also:
-
logger
public static final org.slf4j.Logger loggerThe logger
-
-
Constructor Details
-
DetailedStatsCollector
public DetailedStatsCollector()
-
-
Method Details
-
mPointUpdated
A monitor point with the given ID has been update- Parameters:
id
- The notnull
nor empty ID of the updated monitor point
-
getAndReset
Get the 10 most frequently updated monitor points- Returns:
- The most frequently update monitor points (sorted ascending); empty if no monitor point has been updated in the time interval
-
logAndReset
Logs the message and get ready for the next iteration period.- Returns:
- The logged message or
null
if the list of occurrences is empty.
-