context.reporter().sendCruiseControlMetric(ccm); Snapshot snapshot = histogram.getSnapshot();
AgeSnapshot(final Histogram ageHistogram) { this.ageHistogram = ageHistogram; this.snapshot = ageHistogram.getSnapshot(); }
@Override public double[] values() { return metric.getSnapshot().getValues(); } }
@Override public double get50thPercentile() { return metric.getSnapshot().getMedian(); }
@Override public double get98thPercentile() { return metric.getSnapshot().get98thPercentile(); }
@Override public double get999thPercentile() { return metric.getSnapshot().get999thPercentile(); }
@Override public double get99thPercentile() { return metric.getSnapshot().get99thPercentile(); }
@Override public double get95thPercentile() { return metric.getSnapshot().get95thPercentile(); }
@Override public double get75thPercentile() { return metric.getSnapshot().get75thPercentile(); }
public double getTombstonesPerSlice() { return metric.tombstoneScannedHistogram.cf.getSnapshot().getMedian(); }
public double getLiveCellsPerSlice() { return metric.liveScannedHistogram.cf.getSnapshot().getMedian(); }
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(); }
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(); }
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(); }
/** @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()); }
@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()); }
@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); }
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())); }
@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(); } }
@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"); }