mirror of
https://github.com/google/nomulus
synced 2026-01-04 04:04:22 +00:00
Add default DistributionFitter implementation to EventMetric
This DistributionFitter is suitable for tracking the latency of network calls. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132400538
This commit is contained in:
@@ -41,6 +41,13 @@ import org.joda.time.Instant;
|
||||
*/
|
||||
public final class EventMetric extends AbstractMetric<Distribution> {
|
||||
|
||||
/**
|
||||
* Default {@link DistributionFitter} suitable for latency measurements.
|
||||
*
|
||||
* <p>The finite range of this fitter is from 1 to 4^16 (4294967296).
|
||||
*/
|
||||
public static final DistributionFitter DEFAULT_FITTER = ExponentialFitter.create(16, 4.0, 1.0);
|
||||
|
||||
private final ConcurrentHashMap<ImmutableList<String>, Instant> valueStartTimestamps =
|
||||
newConcurrentHashMap(DEFAULT_CONCURRENCY_LEVEL);
|
||||
private final ConcurrentHashMap<ImmutableList<String>, MutableDistribution> values =
|
||||
|
||||
Reference in New Issue
Block a user