本文整理了Java中com.yammer.metrics.core.Histogram.getSnapshot()
方法的一些代码示例,展示了Histogram.getSnapshot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.getSnapshot()
方法的具体详情如下:
包路径:com.yammer.metrics.core.Histogram
类名称:Histogram
方法名:getSnapshot
暂无
代码示例来源:origin: linkedin/cruise-control
context.reporter().sendCruiseControlMetric(ccm);
Snapshot snapshot = histogram.getSnapshot();
代码示例来源:origin: harbby/presto-connectors
AgeSnapshot(final Histogram ageHistogram) {
this.ageHistogram = ageHistogram;
this.snapshot = ageHistogram.getSnapshot();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double[] values() {
return metric.getSnapshot().getValues();
}
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get50thPercentile() {
return metric.getSnapshot().getMedian();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get98thPercentile() {
return metric.getSnapshot().get98thPercentile();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get999thPercentile() {
return metric.getSnapshot().get999thPercentile();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get99thPercentile() {
return metric.getSnapshot().get99thPercentile();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get95thPercentile() {
return metric.getSnapshot().get95thPercentile();
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public double get75thPercentile() {
return metric.getSnapshot().get75thPercentile();
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
public double getTombstonesPerSlice()
{
return metric.tombstoneScannedHistogram.cf.getSnapshot().getMedian();
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
public double getLiveCellsPerSlice()
{
return metric.liveScannedHistogram.cf.getSnapshot().getMedian();
}
代码示例来源:origin: com.wavefront/java-lib
private void internalProcessYammerHistogram(Histogram histogram, Context context) throws Exception {
final JsonGenerator json = context.json;
json.writeStartObject();
{
json.writeNumberField("count", histogram.count());
writeSummarizable(histogram, json);
writeSampling(histogram, json);
if (context.showFullSamples) {
json.writeObjectField("values", histogram.getSnapshot().getValues());
}
if (clear) histogram.clear();
}
json.writeEndObject();
}
代码示例来源:origin: wavefrontHQ/java
private void internalProcessYammerHistogram(Histogram histogram, Context context) throws Exception {
final JsonGenerator json = context.json;
json.writeStartObject();
{
json.writeNumberField("count", histogram.count());
writeSummarizable(histogram, json);
writeSampling(histogram, json);
if (context.showFullSamples) {
json.writeObjectField("values", histogram.getSnapshot().getValues());
}
if (clear) histogram.clear();
}
json.writeEndObject();
}
代码示例来源:origin: addthis/hydra
private String populateToString(MoreObjects.ToStringHelper helper) {
return helper.add("reading", reading.count())
.add("opening", opening.count())
.add("unseen", openNew.count())
.add("continued", openIndex.count())
.add("skipping", skipping.count())
.add("skipped", openSkip.count())
.add("bundles-skipped", globalBundleSkip.count())
.add("median-size", fileSizeHisto.getSnapshot().getMedian())
.toString();
}
代码示例来源:origin: harbby/presto-connectors
/** @return an abbreviated summary of {@code hist}. */
public static String getShortHistogramReport(final Histogram hist) {
Snapshot sn = hist.getSnapshot();
return "mean=" + DOUBLE_FORMAT.format(hist.mean()) +
", min=" + DOUBLE_FORMAT.format(hist.min()) +
", max=" + DOUBLE_FORMAT.format(hist.max()) +
", stdDev=" + DOUBLE_FORMAT.format(hist.stdDev()) +
", 95th=" + DOUBLE_FORMAT.format(sn.get95thPercentile()) +
", 99th=" + DOUBLE_FORMAT.format(sn.get99thPercentile());
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public void processHistogram(MetricName name, Histogram histogram, PrintStream stream) {
final Snapshot snapshot = histogram.getSnapshot();
stream.printf(locale, " min = %2.2f\n", histogram.min());
stream.printf(locale, " max = %2.2f\n", histogram.max());
stream.printf(locale, " mean = %2.2f\n", histogram.mean());
stream.printf(locale, " stddev = %2.2f\n", histogram.stdDev());
stream.printf(locale, " median = %2.2f\n", snapshot.getMedian());
stream.printf(locale, " 75%% <= %2.2f\n", snapshot.get75thPercentile());
stream.printf(locale, " 95%% <= %2.2f\n", snapshot.get95thPercentile());
stream.printf(locale, " 98%% <= %2.2f\n", snapshot.get98thPercentile());
stream.printf(locale, " 99%% <= %2.2f\n", snapshot.get99thPercentile());
stream.printf(locale, " 99.9%% <= %2.2f\n", snapshot.get999thPercentile());
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public Snapshot getSnapshot() {
final double[] values = histogram.getSnapshot().getValues();
final double[] converted = new double[values.length];
for (int i = 0; i < values.length; i++) {
converted[i] = convertFromNS(values[i]);
}
return new Snapshot(converted);
}
代码示例来源:origin: addthis/metrics-reporter-config
private void addSnapshotDataObject(MetricName key, Histogram histogram, List<DataObject> dataObjectList) {
Snapshot snapshot = histogram.getSnapshot();
dataObjectList.add(toDataObject(key, ".min", histogram.min()));
dataObjectList.add(toDataObject(key, ".max", histogram.max()));
dataObjectList.add(toDataObject(key, ".mean", histogram.mean()));
dataObjectList.add(toDataObject(key, ".stddev", histogram.stdDev()));
dataObjectList.add(toDataObject(key, ".median", snapshot.getMedian()));
dataObjectList.add(toDataObject(key, ".75th", snapshot.get75thPercentile()));
dataObjectList.add(toDataObject(key, ".95th", snapshot.get95thPercentile()));
dataObjectList.add(toDataObject(key, ".98th", snapshot.get98thPercentile()));
dataObjectList.add(toDataObject(key, ".99th", snapshot.get99thPercentile()));
dataObjectList.add(toDataObject(key, ".99.9th", snapshot.get999thPercentile()));
}
代码示例来源:origin: harbby/presto-connectors
@Override
public String toString() {
Snapshot snapshot = this.age.getSnapshot();
return "count=" + count + ", dataBlockCount=" + this.dataBlockCount + ", size=" + size +
", dataSize=" + getDataSize() +
", mean age=" + this.age.mean() + ", stddev age=" + this.age.stdDev() +
", min age=" + this.age.min() + ", max age=" + this.age.max() +
", 95th percentile age=" + snapshot.get95thPercentile() +
", 99th percentile age=" + snapshot.get99thPercentile();
}
}
代码示例来源:origin: addthis/hydra
@Override
public void processHistogram(MetricName name, Histogram histogram, String x) throws IOException {
final String sanitizedName = sanitizeName(name);
final Snapshot snapshot = histogram.getSnapshot();
printDoubleField(sanitizedName + ".min", histogram.min(), "histo");
printDoubleField(sanitizedName + ".max", histogram.max(), "histo");
printDoubleField(sanitizedName + ".mean", histogram.mean(), "histo");
printDoubleField(sanitizedName + ".stddev", histogram.stdDev(), "histo");
printDoubleField(sanitizedName + ".median", snapshot.getMedian(), "histo");
printDoubleField(sanitizedName + ".75percentile", snapshot.get75thPercentile(), "histo");
printDoubleField(sanitizedName + ".95percentile", snapshot.get95thPercentile(), "histo");
printDoubleField(sanitizedName + ".98percentile", snapshot.get98thPercentile(), "histo");
printDoubleField(sanitizedName + ".99percentile", snapshot.get99thPercentile(), "histo");
printDoubleField(sanitizedName + ".999percentile", snapshot.get999thPercentile(), "histo");
}
内容来源于网络,如有侵权,请联系作者删除!