Interface BarrageSubscriptionPerformanceSink
- All Known Implementing Classes:
BarrageSubscriptionPerformanceSink.Noop
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 -
Method Summary
-
Method Details
-
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.histis owned by the caller and isresetand 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.Copyit if the values are needed later.- Parameters:
tableId- the identity of the subscribed tabletableKey- the barrage performance key of the subscribed tablestatType- which statistic this entry describes, for example"WriteNanos"; seeBarrageSubscriptionPerformanceLogger.StatTypetimestampEpochNanos- the time at which this cycle was flushed, as nanoseconds since the epochhist- the values recorded during this cycle, in the unit named bystatType- Throws:
IOException
-