Class DistributionSampler

java.lang.Object
org.jgroups.util.DistributionSampler

public class DistributionSampler extends Object
Records samples (e.g. message sizes or times) by buckets, e.g. 0-10,11-100,101-1000 etc. All buckets are defined at creation time.
Since:
5.5.0
Author:
Bela Ban
  • Field Details

    • buckets

      protected final DistributionSampler.Bucket[] buckets
    • min_value

      protected long min_value
    • max_value

      protected long max_value
    • exception_on_missing_bucket

      protected boolean exception_on_missing_bucket
  • Constructor Details

    • DistributionSampler

      public DistributionSampler(long... buckets)
      Creates a new sampler
      Parameters:
      buckets - The buckets. Needs to be an even number. Each tuple defines min-max size. Needs to be in ascending order of size and adjacent.
    • DistributionSampler

      public DistributionSampler(List<Long> buckets)
  • Method Details