Interface BarrageSubscriptionPerformanceSink

All Known Implementing Classes:
BarrageSubscriptionPerformanceSink.Noop

public interface BarrageSubscriptionPerformanceSink
Receives barrage subscription performance statistics so that an integrator may record them, for example into binary logs. Deephaven Community Core only publishes these statistics to the in-memory table exposed by BarragePerformanceLog.getSubscriptionTable(); install a BarrageTableLoggers.Factory to additionally record them elsewhere.

One entry is logged per (subscription, statistic) pair per flush cycle, where the cycle length is BarragePerformanceLog.CYCLE_DURATION_MILLIS. Values are accumulated in a histogram between flushes, so each entry summarizes many events.

Histogram values are unscaled and carry the unit named by statType: durations are nanoseconds and payload sizes are bytes, matching UpdatePerformanceLog and the rest of the engine's performance streams. See BarrageSubscriptionPerformanceLogger.StatType for the statistics barrage itself records; the in-memory table publishes these same values unscaled, so it and this sink report identical numbers.

ImplNote:
implementations need not be thread safe; all calls to a given instance are serialized.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
     
    void
    log(String tableId, String tableKey, String statType, long timestampEpochNanos, org.HdrHistogram.Histogram hist)
    Record the statistics accumulated for a single (subscription, statistic) pair over one flush cycle.
  • Method Details

    • getDefaultTableName

      static String getDefaultTableName()
      Returns:
      the default name of the table that these entries describe
    • log

      void log(String tableId, String tableKey, String statType, long timestampEpochNanos, org.HdrHistogram.Histogram hist) throws IOException
      Record the statistics accumulated for a single (subscription, statistic) pair over one flush cycle.

      hist is owned by the caller and is reset and reused for the next cycle as soon as this method returns; an implementation must extract everything it needs before returning, and must not retain a reference to it. Copy it if the values are needed later.

      Parameters:
      tableId - the identity of the subscribed table
      tableKey - the barrage performance key of the subscribed table
      statType - which statistic this entry describes, for example "WriteNanos"; see BarrageSubscriptionPerformanceLogger.StatType
      timestampEpochNanos - the time at which this cycle was flushed, as nanoseconds since the epoch
      hist - the values recorded during this cycle, in the unit named by statType
      Throws:
      IOException