[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
main
Abhishek Kona 12 years ago
parent ae558b5c42
commit fb96ec1686
  1. 8
      db/db_bench.cc

@ -695,9 +695,10 @@ class Benchmark {
void PrintHistogram(Histograms histogram_type, std::string name) { void PrintHistogram(Histograms histogram_type, std::string name) {
HistogramData histogramData; HistogramData histogramData;
dbstats->histogramData(histogram_type, &histogramData); dbstats->histogramData(histogram_type, &histogramData);
fprintf(stdout, "%s statistics : \n", name.c_str()); fprintf(stdout, "%s statistics Percentiles :", name.c_str());
fprintf(stdout, "Median : %f\n",histogramData.median); fprintf(stdout, "50 : %f ",histogramData.median);
fprintf(stdout, "99ile : %f\n", histogramData.percentile99); fprintf(stdout, "95 : %f ", histogramData.percentile95);
fprintf(stdout, "99 : %f\n", histogramData.percentile99);
} }
void PrintStatistics() { void PrintStatistics() {
@ -718,6 +719,7 @@ class Benchmark {
dbstats->getTickerCount(COMPACTION_KEY_DROP_USER)); dbstats->getTickerCount(COMPACTION_KEY_DROP_USER));
PrintHistogram(DB_GET, "DB_GET"); PrintHistogram(DB_GET, "DB_GET");
PrintHistogram(DB_WRITE, "DB_WRITE"); PrintHistogram(DB_WRITE, "DB_WRITE");
PrintHistogram(COMPACTION_TIME, "COMPACTION_TIME");
} }
} }

Loading…
Cancel
Save