public class ThroughputCalculator extends Object
Constructor and Description |
---|
ThroughputCalculator(Clock clock,
int numberOfSamples) |
Modifier and Type | Method and Description |
---|---|
long |
calculateThroughput() |
void |
incomingDataSize(long receivedDataSize) |
void |
pauseMeasurement(long absoluteTimeMillis)
Mark when the time should not be taken into account.
|
void |
resumeMeasurement(long absoluteTimeMillis)
Mark when the time should be included to the throughput calculation.
|
public ThroughputCalculator(Clock clock, int numberOfSamples)
public void incomingDataSize(long receivedDataSize)
public void pauseMeasurement(long absoluteTimeMillis)
absoluteTimeMillis
- Current absolute time received outside to avoid performance drop on
calling Clock.absoluteTimeMillis()
inside of the method.public void resumeMeasurement(long absoluteTimeMillis)
absoluteTimeMillis
- Current absolute time received outside to avoid performance drop on
calling Clock.absoluteTimeMillis()
inside of the method.public long calculateThroughput()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.