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 classUpdatePerformanceTracker.EntryEntry class for tracking the performance characteristics of a single recurring update event.static classUpdatePerformanceTracker.InstanceLevelDetailsHolder for logging details that are the same across the UpdatePerformanceTracker instancestatic classUpdatePerformanceTracker.IntervalLevelDetailsHolder for logging details that are the same for every Entry in an intervalstatic interfaceUpdatePerformanceTracker.Listenerstatic classUpdatePerformanceTracker.SubEntryA smaller entry that simply records usage data, meant for aggregating into the larger entry. -
Method Summary
Modifier and Type Method Description voidaddListener(UpdatePerformanceTracker.Listener listener)voidenableUnitTestMode()TablegenerateEmptyReport()UpdatePerformanceTracker.EntrygetEntry(String description)Get a new entry to track the performance characteristics of a single recurring update event.static UpdatePerformanceTrackergetInstance()voidnotifyListeners(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
-