Package com.yammer.metrics.stats

Examples of com.yammer.metrics.stats.UniformSample


    this.min = new AtomicLong();
    this.max = new AtomicLong();
    this.sum = new AtomicLong();
    this.sample = forwardBiased ?
        new ExponentiallyDecayingSample(DEFAULT_SAMPLE_SIZE, DEFAULT_ALPHA)
    : new UniformSample(DEFAULT_SAMPLE_SIZE);

    this.variance =  new AtomicReference<double[]>(new double[]{-1, 0});
    this.count = new AtomicLong();

    this.clear();
View Full Code Here


      try {
        Constructor<?> ctor =
            Histogram.class.getDeclaredConstructor(com.yammer.metrics.stats.Sample.class);
        ctor.setAccessible(true);
        latency = (Histogram) ctor.newInstance(new UniformSample(1024 * 500));
        valueSize = (Histogram) ctor.newInstance(new UniformSample(1024 * 500));
      } catch (Exception e) {
        throw new RuntimeException(e);
      }

    }
View Full Code Here

    this.min = new AtomicLong();
    this.max = new AtomicLong();
    this.sum = new AtomicLong();
    this.sample = forwardBiased ?
        new ExponentiallyDecayingSample(DEFAULT_SAMPLE_SIZE, DEFAULT_ALPHA)
    : new UniformSample(DEFAULT_SAMPLE_SIZE);

    this.variance =  new AtomicReference<double[]>(new double[]{-1, 0});
    this.count = new AtomicLong();

    this.clear();
View Full Code Here

    this.min = new AtomicLong();
    this.max = new AtomicLong();
    this.sum = new AtomicLong();
    this.sample = forwardBiased ?
        new ExponentiallyDecayingSample(DEFAULT_SAMPLE_SIZE, DEFAULT_ALPHA)
    : new UniformSample(DEFAULT_SAMPLE_SIZE);

    this.variance =  new AtomicReference<double[]>(new double[]{-1, 0});
    this.count = new AtomicLong();

    this.clear();
View Full Code Here

      if (!opts.oneCon) {
        this.connection = ConnectionFactory.createConnection(conf);
      }
      this.table = new HTable(TableName.valueOf(opts.tableName), connection);
      this.table.setAutoFlushTo(opts.autoFlush);
      latency = YammerHistogramUtils.newHistogram(new UniformSample(1024 * 500));
      valueSize = YammerHistogramUtils.newHistogram(new UniformSample(1024 * 500));
    }
View Full Code Here

    opts.setValueSize(valueSize);
    RandomReadTest rrt = new RandomReadTest(null, opts, null);
    Constructor<?> ctor =
      Histogram.class.getDeclaredConstructor(com.yammer.metrics.stats.Sample.class);
    ctor.setAccessible(true);
    Histogram histogram = (Histogram)ctor.newInstance(new UniformSample(1024 * 500));
    for (int i = 0; i < 100; i++) {
      histogram.update(rrt.getValueLength(null));
    }
    double stddev = histogram.stdDev();
    assertTrue(stddev != 0 && stddev != 1.0);
View Full Code Here

TOP

Related Classes of com.yammer.metrics.stats.UniformSample

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.