Examples of Histogram


Examples of com.codahale.metrics.Histogram

        if (nrOfSamples == 0) {
            reservoir = new UniformReservoir();
        } else {
            reservoir = new UniformReservoir(nrOfSamples);
        }
        return new Histogram(reservoir);
    }
View Full Code Here

Examples of com.codahale.metrics.Histogram

     * {@inheritDoc}
     */
    @Override
    public Histogram buildHistogram() {
        final SlidingTimeWindowReservoir reservoir = new SlidingTimeWindowReservoir(windowInSeconds, TimeUnit.SECONDS);
        return new Histogram(reservoir);
    }
View Full Code Here

Examples of com.codahale.metrics.Histogram

     *
     * @param name Metric name.
     * @param value Metric value.
     */
    public void update(final String name, final long value) {
        final Histogram histogram = getHistogram(name);
        histogram.update(value);
    }
View Full Code Here

Examples of com.codahale.metrics.Histogram

     *
     * @param name Name for metric.
     * @return Histogram.
     */
    private Histogram getHistogram(final String name) {
        Histogram histogram = metricRegistry.getHistograms().get(name);
        if (histogram == null) {
            histogram = histogramBuilder.buildHistogram();
            metricRegistry.register(name, histogram);
        }
        return histogram;
View Full Code Here

Examples of com.codahale.metrics.Histogram

     */
    @Override
    public Histogram buildHistogram() {

        final SlidingWindowReservoir slidingWindowReservoir = new SlidingWindowReservoir(nrOfMeasurements);
        return new Histogram(slidingWindowReservoir);
    }
View Full Code Here

Examples of com.codahale.metrics.Histogram

        schedulerHandleTimerMap.put(e, timer);
      }
      // histogram for scheduler operations (Samplers)
      schedulerHistogramList = new ArrayList<Histogram>();
      histogramTimerMap = new HashMap<Histogram, Timer>();
      Histogram schedulerAllocateHistogram = new Histogram(
              new SlidingWindowReservoir(SAMPLING_SIZE));
      metrics.register("sampler.scheduler.operation.allocate.timecost",
              schedulerAllocateHistogram);
      schedulerHistogramList.add(schedulerAllocateHistogram);
      histogramTimerMap.put(schedulerAllocateHistogram, schedulerAllocateTimer);
      Histogram schedulerHandleHistogram = new Histogram(
              new SlidingWindowReservoir(SAMPLING_SIZE));
      metrics.register("sampler.scheduler.operation.handle.timecost",
              schedulerHandleHistogram);
      schedulerHistogramList.add(schedulerHandleHistogram);
      histogramTimerMap.put(schedulerHandleHistogram, schedulerHandleTimer);
      for (SchedulerEventType e : SchedulerEventType.values()) {
        Histogram histogram = new Histogram(
                new SlidingWindowReservoir(SAMPLING_SIZE));
        metrics.register(
                "sampler.scheduler.operation.handle." + e + ".timecost",
                histogram);
        schedulerHistogramList.add(histogram);
View Full Code Here

Examples of com.codahale.metrics.Histogram

                count(key, meter, "meterSum", data);
            }

            for (Map.Entry<String, Histogram> histogramEntry : histograms.entrySet()) {
                DemuxedKey key = new DemuxedKey(histogramEntry.getKey());
                Histogram histogram = histogramEntry.getValue();

                count(key, histogram, "histogramCount", data);
                sampling(key, histogram, 1.0, "histogramSet", data);
            }
View Full Code Here

Examples of com.codahale.metrics.Histogram

        schedulerHandleTimerMap.put(e, timer);
      }
      // histogram for scheduler operations (Samplers)
      schedulerHistogramList = new ArrayList<Histogram>();
      histogramTimerMap = new HashMap<Histogram, Timer>();
      Histogram schedulerAllocateHistogram = new Histogram(
              new SlidingWindowReservoir(SAMPLING_SIZE));
      metrics.register("sampler.scheduler.operation.allocate.timecost",
              schedulerAllocateHistogram);
      schedulerHistogramList.add(schedulerAllocateHistogram);
      histogramTimerMap.put(schedulerAllocateHistogram, schedulerAllocateTimer);
      Histogram schedulerHandleHistogram = new Histogram(
              new SlidingWindowReservoir(SAMPLING_SIZE));
      metrics.register("sampler.scheduler.operation.handle.timecost",
              schedulerHandleHistogram);
      schedulerHistogramList.add(schedulerHandleHistogram);
      histogramTimerMap.put(schedulerHandleHistogram, schedulerHandleTimer);
      for (SchedulerEventType e : SchedulerEventType.values()) {
        Histogram histogram = new Histogram(
                new SlidingWindowReservoir(SAMPLING_SIZE));
        metrics.register(
                "sampler.scheduler.operation.handle." + e + ".timecost",
                histogram);
        schedulerHistogramList.add(histogram);
View Full Code Here

Examples of com.foundationdb.server.store.statistics.Histogram

        List<IndexColumn> allIndexColumns = index.getAllColumns();
        IndexStatistics statsForRequestedIndex = getIndexStatistics(index);
        int nIndexColumns = allIndexColumns.size();
        int nKeyColumns = index.getKeyColumns().size();
        for (int i = 0; i < nIndexColumns; i++) {
            Histogram histogram = null;
            Index indexColumnsIndex = null;
            // Use a histogram of the index itself, if possible.
            if (i < nKeyColumns && statsForRequestedIndex != null) {
                indexColumnsIndex = index;
                histogram = statsForRequestedIndex.getHistogram(i, 1);
View Full Code Here

Examples of com.google.test.metric.report.chart.Histogram

  public MultiHistogramDataModel buildHistogramDataModel(List<Integer> costs,
      Function<Integer, Double> scalingFunction) {
    int binCount = min(MAX_HISTOGRAM_BINS, 10 * (int) log(costs.size()) + 1);
    int binWidth = (int) ceil((double) findMax(costs) / binCount);
    Histogram overallHistogram = new Histogram(0, binWidth, binCount, scalingFunction);
    Histogram excellentHistogram = new Histogram(0, binWidth, binCount, scalingFunction);
    Histogram goodHistogram = new Histogram(0, binWidth, binCount, scalingFunction);
    Histogram needsWorkHistogram = new Histogram(0, binWidth, binCount, scalingFunction);
    for (int overallCost : costs) {
      if (overallCost <= maxExcellentCost) {
        excellentHistogram.value(overallCost);
      } else if (overallCost <= maxAcceptableCost) {
        goodHistogram.value(overallCost);
      } else {
        needsWorkHistogram.value(overallCost);
      }
      overallHistogram.value(overallCost);
    }
    int maxBin = overallHistogram.getMaxBin();
    excellentHistogram.setMaxBin(maxBin);
    goodHistogram.setMaxBin(maxBin);
    needsWorkHistogram.setMaxBin(maxBin);

    return new MultiHistogramDataModel(excellentHistogram, goodHistogram, needsWorkHistogram,
        overallHistogram, binCount, binWidth);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.