提交 5bfb67d9 编写于 作者: Y Yi Wu 提交者: Facebook Github Bot

Enable write rate limit for updaterandom benchmark

Summary:
We have FLAGS_benchmark_write_rate_limit to limit write rate in
db_bench, but it was not in use for updaterandom benchmark.
Closes https://github.com/facebook/rocksdb/pull/2578

Differential Revision: D5420328

Pulled By: yiwu-arbug

fbshipit-source-id: 5fa48c2b88f2f2dc83d615cb9c40c472bc916835
上级 20a691d9
......@@ -489,7 +489,8 @@ static bool ValidateCacheNumshardbits(const char* flagname, int32_t value) {
return true;
}
DEFINE_bool(verify_checksum, true, "Verify checksum for every block read"
DEFINE_bool(verify_checksum, true,
"Verify checksum for every block read"
" from storage");
DEFINE_bool(statistics, false, "Database statistics");
......@@ -4592,6 +4593,12 @@ void VerifyDBFromDB(std::string& truth_db_name) {
abort();
}
if (thread->shared->write_rate_limiter) {
thread->shared->write_rate_limiter->Request(
key.size() + value_size_, Env::IO_HIGH, nullptr /*stats*/,
RateLimiter::OpType::kWrite);
}
Status s = db->Put(write_options_, key, gen.Generate(value_size_));
if (!s.ok()) {
fprintf(stderr, "put error: %s\n", s.ToString().c_str());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册