当前位置: 首页>>代码示例>>Java>>正文


Java Snapshot.get98thPercentile方法代码示例

本文整理汇总了Java中com.codahale.metrics.Snapshot.get98thPercentile方法的典型用法代码示例。如果您正苦于以下问题:Java Snapshot.get98thPercentile方法的具体用法?Java Snapshot.get98thPercentile怎么用?Java Snapshot.get98thPercentile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.codahale.metrics.Snapshot的用法示例。


在下文中一共展示了Snapshot.get98thPercentile方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reportHistograms

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
private void reportHistograms(final long timestamp, final SortedMap<String, Histogram> histograms) {
    Object[] meta = new Object[]{timestamp};
    for (Map.Entry<String, Histogram> entry : histograms.entrySet()) {
        String name = entry.getKey();
        Histogram histogram = entry.getValue();
        Snapshot snapshot = histogram.getSnapshot();
        Object[] payload = new Object[13];
        payload[0] = source;
        payload[1] = name;
        payload[2] = histogram.getCount();
        payload[3] = snapshot.getMax();
        payload[4] = snapshot.getMean();
        payload[5] = snapshot.getMin();
        payload[6] = snapshot.getStdDev();
        payload[7] = snapshot.getMedian();
        payload[8] = snapshot.get75thPercentile();
        payload[9] = snapshot.get95thPercentile();
        payload[10] = snapshot.get98thPercentile();
        payload[11] = snapshot.get99thPercentile();
        payload[12] = snapshot.get999thPercentile();
        Event event = new Event(HISTOGRAM_STREAM_ID, timestamp, meta, null, payload);
        dataPublisher.publish(event);
    }
}
 
开发者ID:wso2,项目名称:carbon-metrics,代码行数:25,代码来源:DasReporter.java

示例2: serialise

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
public MetricsHistogram serialise(String name, Histogram histo)
{
	Snapshot snapshot = histo.getSnapshot();
	final long count = histo.getCount();
	return new MetricsHistogram(name,
	                            count,
	                            snapshot.size(),
	                            snapshot.getMin(),
	                            snapshot.getMax(),
	                            snapshot.getStdDev(),
	                            snapshot.getMean(),
	                            snapshot.getMedian(),
	                            snapshot.get75thPercentile(),
	                            snapshot.get95thPercentile(),
	                            snapshot.get98thPercentile(),
	                            snapshot.get99thPercentile(),
	                            snapshot.get999thPercentile());
}
 
开发者ID:petergeneric,项目名称:stdlib,代码行数:19,代码来源:MetricSerialiser.java

示例3: HistogramEntity

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
public HistogramEntity(final Snapshot snapshot) {
    max = snapshot.getMax();
    mean = snapshot.getMean();
    min = snapshot.getMin();
    stdDev = snapshot.getStdDev();
    median = snapshot.getMedian();
    p75 = snapshot.get75thPercentile();
    p95 = snapshot.get95thPercentile();
    p98 = snapshot.get98thPercentile();
    p99 = snapshot.get99thPercentile();
    p999 = snapshot.get999thPercentile();
}
 
开发者ID:quanticc,项目名称:ugc-bot-redux,代码行数:13,代码来源:HistogramEntity.java

示例4: reportTimer

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
private void reportTimer(String name, Timer timer, long timestamp, List<String> tags)
    throws IOException {
  final Snapshot snapshot = timer.getSnapshot();

  LOG.debug("Timer[" +name + "] " + timer);
  if(timer instanceof HistImplContainer) {
    HistImpl take = ((HistImplContainer)timer).getHistImpl().copyAndReset();
    LOG.debug("Adding Circonus Histogram to report: " + name);
    request.addHistogram(new CirconusHistogram(
          name, take, timestamp, host, tags));
    if(suppress_bad_analytics) return;
  }

  double[] values = { snapshot.getMax(), snapshot.getMean(), snapshot.getMin(), snapshot.getStdDev(),
      snapshot.getMedian(), snapshot.get75thPercentile(), snapshot.get95thPercentile(), snapshot.get98thPercentile(),
      snapshot.get99thPercentile(), snapshot.get999thPercentile() };

  for (int i = 0; i < STATS_EXPANSIONS.length; i++) {
    if (expansions.contains(STATS_EXPANSIONS[i])) {
      request.addGauge(new CirconusGauge(
          appendExpansionSuffix(name, STATS_EXPANSIONS[i]),
          toNumber(convertDuration(values[i])),
          timestamp,
          host,
          tags));
    }
  }

  reportMetered(name, timer, timestamp, tags);
}
 
开发者ID:circonus-labs,项目名称:metrics-circonus,代码行数:31,代码来源:CirconusReporter.java

示例5: reportHistogram

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
private void reportHistogram(String name, Histogram histogram, long timestamp, List<String> tags)
    throws IOException {
  final Snapshot snapshot = histogram.getSnapshot();

  if(histogram instanceof HistImplContainer) {
    HistImpl take = ((HistImplContainer)histogram).getHistImpl().copyAndReset();
    LOG.debug("Adding Circonus Histogram to report: " + name);
    request.addHistogram(new CirconusHistogram(
          name, take, timestamp, host, tags));
    if(suppress_bad_analytics) return;
  }

  if (expansions.contains(Expansion.COUNT)) {
    request.addGauge(new CirconusGauge(
        appendExpansionSuffix(name, Expansion.COUNT),
        histogram.getCount(),
        timestamp,
        host,
        tags));
  }

  Number[] values = { snapshot.getMax(), snapshot.getMean(), snapshot.getMin(), snapshot.getStdDev(),
      snapshot.getMedian(), snapshot.get75thPercentile(), snapshot.get95thPercentile(), snapshot.get98thPercentile(),
      snapshot.get99thPercentile(), snapshot.get999thPercentile() };

  for (int i = 0; i < STATS_EXPANSIONS.length; i++) {
    if (expansions.contains(STATS_EXPANSIONS[i])) {
      request.addGauge(new CirconusGauge(
          appendExpansionSuffix(name, STATS_EXPANSIONS[i]),
          toNumber(values[i]),
          timestamp,
          host,
          tags));
    }
  }
}
 
开发者ID:circonus-labs,项目名称:metrics-circonus,代码行数:37,代码来源:CirconusReporter.java

示例6: SamplingAdapter

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
public SamplingAdapter(Sampling samplingMetric, String name, String description, Unit<?> unit) {
    this.samplingMetric = samplingMetric;
    Snapshot snapshot = samplingMetric.getSnapshot();
    this.mean = new NonSelfRegisteringSettableValue<>(name(name, "mean"), description + " - Mean", unit, snapshot.getMean(), ValueSemantics.FREE_RUNNING);
    this.seventyFifthPercentile = new NonSelfRegisteringSettableValue<>(name(name, "seventyfifth"), description + " - 75th Percentile of recent data", unit, snapshot.get75thPercentile(), ValueSemantics.FREE_RUNNING);
    this.ninetyFifthPercentile = new NonSelfRegisteringSettableValue<>(name(name, "ninetyfifth"), description + " - 95th Percentile of recent data", unit, snapshot.get95thPercentile(), ValueSemantics.FREE_RUNNING);
    this.ninetyEighthPercentile = new NonSelfRegisteringSettableValue<>(name(name, "ninetyeighth"), description + " - 98th Percentile of recent data", unit, snapshot.get98thPercentile(), ValueSemantics.FREE_RUNNING);
    this.ninetyNinthPercentile = new NonSelfRegisteringSettableValue<>(name(name, "ninetynineth"), description + " - 99th Percentile of recent data", unit, snapshot.get99thPercentile(), ValueSemantics.FREE_RUNNING);
    this.threeNinesPercentile = new NonSelfRegisteringSettableValue<>(name(name, "threenines"), description + " - 99.9th Percentile of recent data", unit, snapshot.get999thPercentile(), ValueSemantics.FREE_RUNNING);

    this.median = new NonSelfRegisteringSettableValue<>(name(name, "median"), description + " - Median", unit, snapshot.getMedian(), ValueSemantics.FREE_RUNNING);
    this.max = new NonSelfRegisteringSettableValue<>(name(name, "max"), description + " - Maximum", unit, snapshot.getMax(), ValueSemantics.MONOTONICALLY_INCREASING);
    this.min = new NonSelfRegisteringSettableValue<>(name(name, "min"), description + " - Minimum", unit, snapshot.getMin(), ValueSemantics.FREE_RUNNING);
    this.stddev = new NonSelfRegisteringSettableValue<>(name(name, "stddev"), description + " - Standard Deviation", unit, snapshot.getStdDev(), ValueSemantics.FREE_RUNNING);
}
 
开发者ID:performancecopilot,项目名称:parfait,代码行数:16,代码来源:SamplingAdapter.java

示例7: reportHistogramSnapshot

import com.codahale.metrics.Snapshot; //导入方法依赖的package包/类
private String reportHistogramSnapshot(Snapshot snapshot) {
	return "min=" + snapshot.getMin() + ","
			+ "max=" + snapshot.getMax() + ","
			+ "mean=" + snapshot.getMean() + ","
			+ "p50=" + snapshot.getMedian() + ","
			+ "std=" + snapshot.getStdDev() + ","
			+ "p25=" + snapshot.getValue(0.25) + ","
			+ "p75=" + snapshot.get75thPercentile() + ","
			+ "p95=" + snapshot.get95thPercentile() + ","
			+ "p98=" + snapshot.get98thPercentile() + ","
			+ "p99=" + snapshot.get99thPercentile() + ","
			+ "p999=" + snapshot.get999thPercentile();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:14,代码来源:InfluxDbReporter.java


注:本文中的com.codahale.metrics.Snapshot.get98thPercentile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。