Class BarragePerformanceLog

java.lang.Object
io.deephaven.extensions.barrage.BarragePerformanceLog

public class BarragePerformanceLog extends Object
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.
  • Field Details

    • ALL_PERFORMANCE_ENABLED

      public static final boolean ALL_PERFORMANCE_ENABLED
      If all barrage performance logging is enabled by default, then table's description is used as TableKey unless overridden with the table key AttributeMap.withAttributes(Map) attribute}.
    • CYCLE_DURATION_MILLIS

      public static final long CYCLE_DURATION_MILLIS
      Explicitly set this parameter to flush performance metrics more frequently.
  • Method Details

    • getInstance

      public static BarragePerformanceLog getInstance()
      Get the singleton instance, creating it if necessary. The instance resolves its performance sinks from BarrageTableLoggers.get() when it is created, so BarrageTableLoggers.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

      public static String getKeyFor(@NotNull @NotNull Table table)
      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 logged
      descriptionSupplier - supplier for a description of the source
      Returns:
      the table key or null if no entry should not be logged
    • getSubscriptionTable

      public QueryTable getSubscriptionTable()
    • getSubscriptionLogger

      public BarrageSubscriptionPerformanceLogger getSubscriptionLogger()
    • getSnapshotTable

      public QueryTable getSnapshotTable()
    • getSnapshotLogger

      public BarrageSnapshotPerformanceLogger getSnapshotLogger()