Add --writes_per_second rate limit, print p99.99 in histogram

Summary:
Adds the --writes_per_second rate limit for the readwhilewriting test.
The purpose is to optionally avoid saturating storage with writes & compaction
and test read response time when some writes are being done.

Changes the histogram code to also print the p99.99 value

Task ID: #

Blame Rev:

Test Plan:
make check, ran db_bench with it

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Reviewers: haobo

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D10305
This commit is contained in:
Mark Callaghan
2013-04-17 10:56:39 -07:00
committed by Abhishek Kona
parent e0b60923ee
commit b1ff9ac9c5
2 changed files with 34 additions and 3 deletions

View File

@@ -152,8 +152,10 @@ std::string HistogramImpl::ToString() const {
(num_ == 0.0 ? 0.0 : min_), Median(), max_);
r.append(buf);
snprintf(buf, sizeof(buf),
"Percentiles: P50: %.2f P75: %.2f P99: %.2f P99.9: %.2f\n",
Percentile(50), Percentile(75), Percentile(99), Percentile(99.9));
"Percentiles: "
"P50: %.2f P75: %.2f P99: %.2f P99.9: %.2f P99.99: %.2f\n",
Percentile(50), Percentile(75), Percentile(99), Percentile(99.9),
Percentile(99.99));
r.append(buf);
r.append("------------------------------------------------------\n");
const double mult = 100.0 / num_;