Class UpdatePerformanceTracker
java.lang.Object
io.deephaven.engine.table.impl.perf.UpdatePerformanceTracker
This tool is meant to track periodic update events that take place in an UpdateGraph. This generally
includes:
- Update source
run()invocations TableShiftObliviousListenernotifications (seeShiftObliviousInstrumentedListener)TableTableUpdateListenernotifications (seeInstrumentedTableUpdateListener)
- ApiNote:
- Regarding thread safety, this class interacts with a singleton PeriodicUpdateGraph and expects all calls to
getEntry(String),PerformanceEntry.onUpdateStart(), andPerformanceEntry.onUpdateEnd()to be performed while protected by the UGP's lock.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHolder for logging details that are the same for every Entry in an interval -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanShould all UpdatePerformanceTracker entries be logged once, to permit ancestor discovery even if they would otherwise not qualify for logging based on thelog threshold.static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidflush()Flush this UpdatePerformanceTracker to the downstream publisher and logger, and begin its next interval.static @NotNull QueryTablefinal PerformanceEntryGet a new entry to track the performance characteristics of a single recurring update event.static @NotNull QueryTablevoidlogAncestors(String updateGraphName, PerformanceEntry entry, Supplier<long[]> ancestors) Log an array of ancestors for the provided entry.static voidvoidstart()Start this UpdatePerformanceTracker, by beginning its first interval.
-
Field Details
-
REPORT_INTERVAL_MILLIS
public static final long REPORT_INTERVAL_MILLIS -
LOG_ALL_ENTRIES_ONCE
public static final boolean LOG_ALL_ENTRIES_ONCEShould all UpdatePerformanceTracker entries be logged once, to permit ancestor discovery even if they would otherwise not qualify for logging based on thelog threshold.
-
-
Constructor Details
-
UpdatePerformanceTracker
-
-
Method Details
-
start
public void start()Start this UpdatePerformanceTracker, by beginning its first interval. -
flush
public void flush()Flush this UpdatePerformanceTracker to the downstream publisher and logger, and begin its next interval. -
logAncestors
public void logAncestors(String updateGraphName, PerformanceEntry entry, Supplier<long[]> ancestors) Log an array of ancestors for the provided entry.- Parameters:
entry- entry of entry to log forancestors- array of ancestor ids
-
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
-
getQueryTable
-
getAncestorTable
-
resetForUnitTests
-