diff --git a/util/benchharness.cc b/util/benchharness.cc index 1c282aee4edf6ea6dbeddb5befb948ce889e130c..4218f3c308d8d25023fcf2ea7feecf545809af39 100644 --- a/util/benchharness.cc +++ b/util/benchharness.cc @@ -17,25 +17,13 @@ #include #include -#include - -using std::function; -using std::get; -using std::make_pair; -using std::max; -using std::min; -using std::pair; -using std::sort; -using std::string; -using std::tuple; -using std::vector; - #ifndef GFLAGS bool FLAGS_benchmark = false; uint64_t FLAGS_bm_min_usec = 100; -int64_t FLAGS_bm_min_iter = 1; +int64_t FLAGS_bm_min_iters = 1; int32_t FLAGS_bm_max_secs = 1; #else +#include DEFINE_bool(benchmark, false, "Run benchmarks."); DEFINE_uint64(bm_min_usec, 100, @@ -48,6 +36,17 @@ DEFINE_int32(bm_max_secs, 1, "Maximum # of seconds we'll spend on each benchmark."); #endif // GFLAGS +using std::function; +using std::get; +using std::make_pair; +using std::max; +using std::min; +using std::pair; +using std::sort; +using std::string; +using std::tuple; +using std::vector; + namespace rocksdb { namespace benchmark { diff --git a/util/options_test.cc b/util/options_test.cc index 1a67021437ed917fd9f12f94eb42658134f362b6..4d6746ec2e59bb35e6535cddb83a2867c907f6cd 100644 --- a/util/options_test.cc +++ b/util/options_test.cc @@ -13,7 +13,6 @@ #include #include -#include #include "rocksdb/options.h" #include "rocksdb/table.h" @@ -23,8 +22,13 @@ #include "rocksdb/utilities/leveldb_options.h" #include "rocksdb/utilities/convenience.h" +#ifndef GFLAGS +bool FLAGS_enable_print = false; +#else +#include using GFLAGS::ParseCommandLineFlags; DEFINE_bool(enable_print, false, "Print options generated to console."); +#endif // GFLAGS namespace rocksdb { @@ -357,6 +361,8 @@ TEST(OptionsTest, ConvertOptionsTest) { } // namespace rocksdb int main(int argc, char** argv) { +#ifdef GFLAGS ParseCommandLineFlags(&argc, &argv, true); +#endif // GFLAGS return rocksdb::test::RunAllTests(); }