Package io.deephaven.extensions.barrage
Class BarragePerformanceLog
java.lang.Object
io.deephaven.extensions.barrage.BarragePerformanceLog
Enable barrage performance metrics by setting the
BarragePerformanceLog.enableAll configuration property, or
by adding the table key as an
AttributeMap.withAttributes(Map) attribute} to the table.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanIf all barrage performance logging is enabled by default, then table's description is used as TableKey unless overridden with thetable keyAttributeMap.withAttributes(Map)attribute}.static final longExplicitly set this parameter to flush performance metrics more frequently. -
Method Summary
Modifier and TypeMethodDescriptionstatic BarragePerformanceLogGet the singleton instance, creating it if necessary.static @Nullable StringgetKeyFor(@NotNull AttributeMap source, @NotNull Supplier<String> descriptionSupplier) Return the performance key for the provided source.static StringReturn the performance key for the provided table.
-
Field Details
-
ALL_PERFORMANCE_ENABLED
public static final boolean ALL_PERFORMANCE_ENABLEDIf all barrage performance logging is enabled by default, then table's description is used as TableKey unless overridden with thetable keyAttributeMap.withAttributes(Map)attribute}. -
CYCLE_DURATION_MILLIS
public static final long CYCLE_DURATION_MILLISExplicitly set this parameter to flush performance metrics more frequently.
-
-
Method Details
-
getInstance
Get the singleton instance, creating it if necessary. The instance resolves its performance sinks fromBarrageTableLoggers.get()when it is created, soBarrageTableLoggers.set(BarrageTableLoggers.Factory)must be called before first use for an integrator-provided factory to take effect.NB: Creating the instance registers the in-memory blink tables with the update graph of the calling thread's
ExecutionContext, so the first call must come from a context that has a live update graph. Callers should let the first real barrage activity create the instance rather than forcing it during startup, when no such context typically exists yet.- Returns:
- the singleton
BarragePerformanceLog
-
getKeyFor
Return the performance key for the provided table.- Parameters:
table- the table that will be logged- Returns:
- the table key or null if no entry should not be logged
-
getKeyFor
@Nullable public static @Nullable String getKeyFor(@NotNull @NotNull AttributeMap source, @NotNull @NotNull Supplier<String> descriptionSupplier) Return the performance key for the provided source.- Parameters:
source- the source that will be loggeddescriptionSupplier- supplier for a description of the source- Returns:
- the table key or null if no entry should not be logged
-
getSubscriptionTable
-
getSubscriptionLogger
-
getSnapshotTable
-
getSnapshotLogger
-