java.lang.Object
net.i2p.stat.Rate.CoalescedSample
Enclosing class:
Rate

public static final class Rate.CoalescedSampleextends Object
One coalesced sample, retained so a healed listener can backfill missed steps.

The timestampMs field is the sample's archive step stamp and is the reason this class exists: RateSummaryListener.add reports no timestamp, so without it a listener has no way to write the sample into the step it belongs to. Fields are final because instances are published to the delivery thread and to console readers.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final long
    Number of events in the period.
    final long
    The rate's period in ms.
    final long
    Wall-clock ms stamped at coalesce; the sample's step is this over period.
    final double
    Accumulated event time for the period.
    final double
    Total value accrued over the period, as handed to the summary listener.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CoalescedSample(long timestampMs, double totalValue, long eventCount, double totalEventTime, long period)
    One period's totals as captured by a coalesce.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
     

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • timestampMs

      public final long timestampMs
      Wall-clock ms stamped at coalesce; the sample's step is this over period.
    • totalValue

      public final double totalValue
      Total value accrued over the period, as handed to the summary listener.
    • eventCount

      public final long eventCount
      Number of events in the period.
    • totalEventTime

      public final double totalEventTime
      Accumulated event time for the period.
    • period

      public final long period
      The rate's period in ms.
  • Constructor Details

    • CoalescedSample

      CoalescedSample(long timestampMs, double totalValue, long eventCount, double totalEventTime, long period)
      One period's totals as captured by a coalesce.
      Parameters:
      timestampMs - wall-clock ms stamped at coalesce
      totalValue - total value accrued over the period
      eventCount - number of events in the period
      totalEventTime - accumulated event time for the period
      period - the rate period in ms
  • Method Details