Fixed Minor Bug on Windows Build and db_bench_tool.cc (#1189)

* Fixed Windows build error in CMakeLists.txt and perf_level error in db_bench_tool.cc

* Changed hard-coded perf levels in db_bench_tool.cc to enum values from perf_level.h

* Replaced remaining FLAGS_perf_level > 0
This commit is contained in:
John Alexander 2016-06-29 18:44:22 -07:00 committed by Islam AbdelRahman
parent 95c192475d
commit 43692793e3
2 changed files with 7 additions and 5 deletions

View File

@ -113,6 +113,7 @@ set(SOURCES
db/db_impl.cc
db/db_impl_debug.cc
db/db_impl_experimental.cc
db/db_impl_add_file.cc
db/db_impl_readonly.cc
db/db_info_dumper.cc
db/db_iter.cc
@ -266,6 +267,7 @@ set(SOURCES
utilities/persistent_cache/persistent_cache_tier.cc
utilities/persistent_cache/volatile_tier_impl.cc
utilities/redis/redis_lists.cc
utilities/simulator_cache/sim_cache.cc
utilities/spatialdb/spatial_db.cc
utilities/table_properties_collectors/compact_on_deletion_collector.cc
utilities/transactions/optimistic_transaction_impl.cc

View File

@ -662,7 +662,7 @@ DEFINE_int32(thread_status_per_interval, 0,
"Takes and report a snapshot of the current status of each thread"
" when this is greater than 0.");
DEFINE_int32(perf_level, 0, "Level of perf collection");
DEFINE_int32(perf_level, rocksdb::PerfLevel::kDisable, "Level of perf collection");
static bool ValidateRateLimit(const char* flagname, double value) {
const double EPSILON = 1e-10;
@ -3091,7 +3091,7 @@ class Benchmark {
thread->stats.AddMessage(msg);
if (FLAGS_perf_level > 0) {
if (FLAGS_perf_level > rocksdb::PerfLevel::kDisable) {
thread->stats.AddMessage(perf_context.ToString());
}
}
@ -3159,7 +3159,7 @@ class Benchmark {
thread->stats.AddBytes(bytes);
thread->stats.AddMessage(msg);
if (FLAGS_perf_level > 0) {
if (FLAGS_perf_level > rocksdb::PerfLevel::kDisable) {
thread->stats.AddMessage(perf_context.ToString());
}
}
@ -3302,7 +3302,7 @@ class Benchmark {
found, read);
thread->stats.AddBytes(bytes);
thread->stats.AddMessage(msg);
if (FLAGS_perf_level > 0) {
if (FLAGS_perf_level > rocksdb::PerfLevel::kDisable) {
thread->stats.AddMessage(perf_context.ToString());
}
}
@ -3939,7 +3939,7 @@ class Benchmark {
}
thread->stats.AddMessage(msg);
if (FLAGS_perf_level > 0) {
if (FLAGS_perf_level > rocksdb::PerfLevel::kDisable) {
thread->stats.AddMessage(perf_context.ToString());
}
}