From 990b2f4cb313f4a47cb0bc3ba907862e6c47d4b0 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Tue, 23 Apr 2019 11:12:39 -0700 Subject: [PATCH] Fix compilation on db_bench_tool.cc on Windows (#5227) Summary: I needed this change to be able to build the v6.0.1 release on Windows. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5227 Differential Revision: D15033815 Pulled By: sagar0 fbshipit-source-id: 579f3b8e694c34c0d43527eb2fa37175e37f5911 --- tools/db_bench_tool.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index bba038d7a..24643ff76 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -4816,10 +4816,10 @@ void VerifyDBFromDB(std::string& truth_db_name) { // the limit of qps initiation if (FLAGS_sine_a != 0 || FLAGS_sine_d != 0) { thread->shared->read_rate_limiter.reset(NewGenericRateLimiter( - read_rate, 100000 /* refill_period_us */, 10 /* fairness */, + static_cast(read_rate), 100000 /* refill_period_us */, 10 /* fairness */, RateLimiter::Mode::kReadsOnly)); thread->shared->write_rate_limiter.reset( - NewGenericRateLimiter(write_rate)); + NewGenericRateLimiter(static_cast(write_rate))); } Duration duration(FLAGS_duration, reads_); @@ -4855,9 +4855,9 @@ void VerifyDBFromDB(std::string& truth_db_name) { mix_rate_with_noise * query.ratio_[1] * FLAGS_mix_ave_kv_size; thread->shared->write_rate_limiter.reset( - NewGenericRateLimiter(write_rate)); + NewGenericRateLimiter(static_cast(write_rate))); thread->shared->read_rate_limiter.reset(NewGenericRateLimiter( - read_rate, + static_cast(read_rate), FLAGS_sine_mix_rate_interval_milliseconds * uint64_t{1000}, 10, RateLimiter::Mode::kReadsOnly)); }