public class ThroughputEstimator
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ThroughputEstimator() |
Modifier and Type | Method and Description |
---|---|
double |
get()
Returns the estimated throughput for now.
|
double |
getFrom(com.google.cloud.Timestamp time)
Returns the estimated throughput for a specified time.
|
void |
update(com.google.cloud.Timestamp timeOfRecords,
long bytes)
Updates the estimator with the bytes of records.
|
public void update(com.google.cloud.Timestamp timeOfRecords, long bytes)
timeOfRecords
- the committed timestamp of the recordsbytes
- the total bytes of the recordspublic double get()
public double getFrom(com.google.cloud.Timestamp time)
time
- the specified timestamp to check throughput