Class that keeps track of a rolling window sum.
For use in tracking recent performance of the connector.
Intended to be similar to org.apache.beam.sdk.util.MovingFunction(…, Sum.ofLongs()), but for convenience we expose the count of entries as well so this doubles as a moving average tracker.
Determines request sizes for future Datastore RPCs.
report_latency(now, latency_ms, num_mutations)[source]¶
Report the latency of a Datastore RPC.
- now – double, completion time of the RPC as seconds since the epoch.
- latency_ms – double, the observed latency in milliseconds for this RPC.
- num_mutations – int, number of mutations contained in the RPC.