diff --git a/util/benchharness.cc b/util/benchharness.cc index 1c282aee4e..4218f3c308 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 1a67021437..4d6746ec2e 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(); }