mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02: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:
parent
42a39b0ddc
commit
4652688585
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,13 @@ import org.joda.time.Instant;
|
||||||
*/
|
*/
|
||||||
public final class EventMetric extends AbstractMetric<Distribution> {
|
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 =
|
private final ConcurrentHashMap<ImmutableList<String>, Instant> valueStartTimestamps =
|
||||||
newConcurrentHashMap(DEFAULT_CONCURRENCY_LEVEL);
|
newConcurrentHashMap(DEFAULT_CONCURRENCY_LEVEL);
|
||||||
private final ConcurrentHashMap<ImmutableList<String>, MutableDistribution> values =
|
private final ConcurrentHashMap<ImmutableList<String>, MutableDistribution> values =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue