java.lang.Object
net.i2p.stat.Rate.CoalescedSample
- Enclosing class:
Rate
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
FieldsModifier and TypeFieldDescriptionfinal longNumber of events in the period.final longThe rate's period in ms.final longWall-clock ms stamped at coalesce; the sample's step is this overperiod.final doubleAccumulated event time for the period.final doubleTotal value accrued over the period, as handed to the summary listener.Constructor Summary
ConstructorsConstructorDescriptionCoalescedSample(long timestampMs, double totalValue, long eventCount, double totalEventTime, long period) One period's totals as captured by a coalesce.Method Summary
Field Details
timestampMs
public final long timestampMsWall-clock ms stamped at coalesce; the sample's step is this overperiod.totalValue
public final double totalValueTotal value accrued over the period, as handed to the summary listener.eventCount
public final long eventCountNumber of events in the period.totalEventTime
public final double totalEventTimeAccumulated event time for the period.period
public final long periodThe 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 coalescetotalValue- total value accrued over the periodeventCount- number of events in the periodtotalEventTime- accumulated event time for the periodperiod- the rate period in ms
Method Details
toString