From fb96ec1686bf6c49bf65c8177a48b4ee551598fb Mon Sep 17 00:00:00 2001 From: Abhishek Kona Date: Thu, 25 Apr 2013 13:36:47 -0700 Subject: [PATCH] [RocksDB] Print all internally collected histograms in db_bench. Also print p95 Summary: $title Test Plan: make db_bench . run db_bench and check for expected output Reviewers: haobo, dhruba Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D10521 --- db/db_bench.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/db/db_bench.cc b/db/db_bench.cc index 2ce0356c6..621198e89 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -695,9 +695,10 @@ class Benchmark { void PrintHistogram(Histograms histogram_type, std::string name) { HistogramData histogramData; dbstats->histogramData(histogram_type, &histogramData); - fprintf(stdout, "%s statistics : \n", name.c_str()); - fprintf(stdout, "Median : %f\n",histogramData.median); - fprintf(stdout, "99ile : %f\n", histogramData.percentile99); + fprintf(stdout, "%s statistics Percentiles :", name.c_str()); + fprintf(stdout, "50 : %f ",histogramData.median); + fprintf(stdout, "95 : %f ", histogramData.percentile95); + fprintf(stdout, "99 : %f\n", histogramData.percentile99); } void PrintStatistics() { @@ -718,6 +719,7 @@ class Benchmark { dbstats->getTickerCount(COMPACTION_KEY_DROP_USER)); PrintHistogram(DB_GET, "DB_GET"); PrintHistogram(DB_WRITE, "DB_WRITE"); + PrintHistogram(COMPACTION_TIME, "COMPACTION_TIME"); } }