public EstimatedHistogram(int bucketCount, boolean considerZeroes) { bucketOffsets = newOffsets(bucketCount, considerZeroes); buckets = new AtomicLongArray(bucketOffsets.length + 1); }
/** * Create EstimatedHistogram from only bucket data. * * @param bucketData bucket data */ public EstimatedHistogram(long[] bucketData) { assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0"; bucketOffsets = newOffsets(bucketData.length - 1, false); buckets = new AtomicLongArray(bucketData); }
public EstimatedHistogram(int bucketCount, boolean considerZeroes) { bucketOffsets = newOffsets(bucketCount, considerZeroes); buckets = new AtomicLongArray(bucketOffsets.length + 1); }
public EstimatedHistogram(int bucketCount, boolean considerZeroes) { bucketOffsets = newOffsets(bucketCount, considerZeroes); buckets = new AtomicLongArray(bucketOffsets.length + 1); }
/** * Create EstimatedHistogram from only bucket data. * * @param bucketData bucket data */ public EstimatedHistogram(long[] bucketData) { assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0"; bucketOffsets = newOffsets(bucketData.length - 1, false); buckets = new AtomicLongArray(bucketData); }
public EstimatedHistogram(int bucketCount, boolean considerZeroes) { bucketOffsets = newOffsets(bucketCount, considerZeroes); buckets = new AtomicLongArray(bucketOffsets.length + 1); }
public EstimatedHistogram(int bucketCount) { bucketOffsets = newOffsets(bucketCount); buckets = new AtomicLongArray(bucketOffsets.length + 1); }
/** * Create EstimatedHistogram from only bucket data. * * @param bucketData bucket data */ public EstimatedHistogram(long[] bucketData) { assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0"; bucketOffsets = newOffsets(bucketData.length - 1, false); buckets = new AtomicLongArray(bucketData); }
/** * Create EstimatedHistogram from only bucket data. * * @param bucketData bucket data */ public EstimatedHistogram(long[] bucketData) { assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0"; bucketOffsets = newOffsets(bucketData.length - 1, false); buckets = new AtomicLongArray(bucketData); }
/** * Create EstimatedHistogram from only bucket data. * * @param bucketData bucket data */ public EstimatedHistogram(long[] bucketData) { assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0"; bucketOffsets = newOffsets(bucketData.length - 1); buckets = new AtomicLongArray(bucketData); }
@VisibleForTesting DecayingEstimatedHistogramReservoir(boolean considerZeroes, int bucketCount, Clock clock) { if (bucketCount == DEFAULT_BUCKET_COUNT) { if (considerZeroes == true) { bucketOffsets = DEFAULT_WITH_ZERO_BUCKET_OFFSETS; } else { bucketOffsets = DEFAULT_WITHOUT_ZERO_BUCKET_OFFSETS; } } else { bucketOffsets = EstimatedHistogram.newOffsets(bucketCount, considerZeroes); } decayingBuckets = new AtomicLongArray(bucketOffsets.length + 1); buckets = new AtomicLongArray(bucketOffsets.length + 1); this.clock = clock; decayLandmark = clock.getTime(); }
@VisibleForTesting DecayingEstimatedHistogramReservoir(boolean considerZeroes, int bucketCount, Clock clock) { if (bucketCount == DEFAULT_BUCKET_COUNT) { if (considerZeroes == true) { bucketOffsets = DEFAULT_WITH_ZERO_BUCKET_OFFSETS; } else { bucketOffsets = DEFAULT_WITHOUT_ZERO_BUCKET_OFFSETS; } } else { bucketOffsets = EstimatedHistogram.newOffsets(bucketCount, considerZeroes); } decayingBuckets = new AtomicLongArray(bucketOffsets.length + 1); buckets = new AtomicLongArray(bucketOffsets.length + 1); this.clock = clock; decayLandmark = clock.getTime(); }
@VisibleForTesting DecayingEstimatedHistogramReservoir(boolean considerZeroes, int bucketCount, Clock clock) { if (bucketCount == DEFAULT_BUCKET_COUNT) { if (considerZeroes == true) { bucketOffsets = DEFAULT_WITH_ZERO_BUCKET_OFFSETS; } else { bucketOffsets = DEFAULT_WITHOUT_ZERO_BUCKET_OFFSETS; } } else { bucketOffsets = EstimatedHistogram.newOffsets(bucketCount, considerZeroes); } decayingBuckets = new AtomicLongArray(bucketOffsets.length + 1); buckets = new AtomicLongArray(bucketOffsets.length + 1); this.clock = clock; decayLandmark = clock.getTime(); }
@VisibleForTesting DecayingEstimatedHistogramReservoir(boolean considerZeroes, int bucketCount, Clock clock) { if (bucketCount == DEFAULT_BUCKET_COUNT) { if (considerZeroes == true) { bucketOffsets = DEFAULT_WITH_ZERO_BUCKET_OFFSETS; } else { bucketOffsets = DEFAULT_WITHOUT_ZERO_BUCKET_OFFSETS; } } else { bucketOffsets = EstimatedHistogram.newOffsets(bucketCount, considerZeroes); } decayingBuckets = new AtomicLongArray(bucketOffsets.length + 1); buckets = new AtomicLongArray(bucketOffsets.length + 1); this.clock = clock; decayLandmark = clock.getTime(); }