Package com.illumon.iris.db.v2.utils
Class UpdatePerformanceTracker
java.lang.Object
com.illumon.iris.db.v2.utils.UpdatePerformanceTracker
public class UpdatePerformanceTracker extends Object
This tool is meant to track periodic update events that take place in a LiveTableMonitor. This generally includes
(1) LiveTable.refresh() invocations
(2) DynamicTable Listener notifications (see InstrumentedListener)
If publishing to Iris DB is enabled, then the table DbInternal/UpdatePerformanceLog will reflect recorded results.
Note: Regarding thread safety, this class interacts with a singleton LiveTableMonitor and expects all calls to
getEntry(), Entry.onUpdateStart(), and Entry.onUpdateEnd() to be performed while protected by the LTM's live
jobs synchronizer.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UpdatePerformanceTracker.Entry
Entry class for tracking the performance characteristics of a single recurring update event.static class
UpdatePerformanceTracker.InstanceLevelDetails
Holder for logging details that are the same across the UpdatePerformanceTracker instancestatic class
UpdatePerformanceTracker.IntervalLevelDetails
Holder for logging details that are the same for every Entry in an intervalstatic interface
UpdatePerformanceTracker.Listener
static class
UpdatePerformanceTracker.SubEntry
A smaller entry that simply records usage data, meant for aggregating into the larger entry. -
Method Summary
Modifier and Type Method Description void
addListener(UpdatePerformanceTracker.Listener listener)
void
enableUnitTestMode()
Table
generateEmptyReport()
UpdatePerformanceTracker.Entry
getEntry(String description)
Get a new entry to track the performance characteristics of a single recurring update event.static UpdatePerformanceTracker
getInstance()
void
notifyListeners(Table report)
-
Method Details
-
getInstance
-
enableUnitTestMode
public void enableUnitTestMode() -
getEntry
Get a new entry to track the performance characteristics of a single recurring update event.- Parameters:
description
- log entry description- Returns:
- UpdatePerformanceTracker.Entry
-
generateEmptyReport
-
addListener
-
notifyListeners
-