diff --git a/CMake/FollyConfigChecks.cmake b/CMake/FollyConfigChecks.cmake index 79a0063d286..a2a5136fdc9 100644 --- a/CMake/FollyConfigChecks.cmake +++ b/CMake/FollyConfigChecks.cmake @@ -178,30 +178,3 @@ check_cxx_source_runs(" }" HAVE_VSNPRINTF_ERRORS ) - -if (FOLLY_HAVE_LIBGFLAGS) - # Older releases of gflags used the namespace "gflags"; newer releases - # use "google" but also make symbols available in the deprecated "gflags" - # namespace too. The folly code internally uses "gflags" unless we tell it - # otherwise. - list(APPEND CMAKE_REQUIRED_LIBRARIES ${FOLLY_LIBGFLAGS_LIBRARY}) - list(APPEND CMAKE_REQUIRED_INCLUDES ${FOLLY_LIBGFLAGS_INCLUDE}) - check_cxx_source_compiles(" - #include - int main() { - gflags::GetArgv(); - return 0; - } - " - GFLAGS_NAMESPACE_IS_GFLAGS - ) - list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FOLLY_LIBGFLAGS_LIBRARY}) - list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FOLLY_LIBGFLAGS_INCLUDE}) - if (GFLAGS_NAMESPACE_IS_GFLAGS) - set(FOLLY_UNUSUAL_GFLAGS_NAMESPACE OFF) - set(FOLLY_GFLAGS_NAMESPACE gflags) - else() - set(FOLLY_UNUSUAL_GFLAGS_NAMESPACE ON) - set(FOLLY_GFLAGS_NAMESPACE google) - endif() -endif() diff --git a/CMake/folly-config.h.cmake b/CMake/folly-config.h.cmake index 84954764499..9a309fbc5cd 100644 --- a/CMake/folly-config.h.cmake +++ b/CMake/folly-config.h.cmake @@ -34,8 +34,6 @@ #cmakedefine FOLLY_HAVE_PTHREAD_ATFORK 1 #cmakedefine FOLLY_HAVE_LIBGFLAGS 1 -#cmakedefine FOLLY_UNUSUAL_GFLAGS_NAMESPACE 1 -#cmakedefine FOLLY_GFLAGS_NAMESPACE @FOLLY_GFLAGS_NAMESPACE@ #cmakedefine FOLLY_HAVE_LIBGLOG 1 diff --git a/folly/cli/ProgramOptions.cpp b/folly/cli/ProgramOptions.cpp index 5c7b8b5ee25..43e31df85fc 100644 --- a/folly/cli/ProgramOptions.cpp +++ b/folly/cli/ProgramOptions.cpp @@ -48,7 +48,7 @@ namespace { template class GFlagInfo { public: - explicit GFlagInfo(gflags::CommandLineFlagInfo info) + explicit GFlagInfo(folly::gflags::CommandLineFlagInfo info) : info_(std::move(info)), isSet_(false) {} void set(const T& value) { @@ -57,8 +57,8 @@ class GFlagInfo { } auto strValue = folly::to(value); - auto msg = - gflags::SetCommandLineOption(info_.name.c_str(), strValue.c_str()); + auto msg = folly::gflags::SetCommandLineOption( + info_.name.c_str(), strValue.c_str()); if (msg.empty()) { throw po::invalid_option_value(strValue); } @@ -67,14 +67,14 @@ class GFlagInfo { T get() const { std::string str; - CHECK(gflags::GetCommandLineOption(info_.name.c_str(), &str)); + CHECK(folly::gflags::GetCommandLineOption(info_.name.c_str(), &str)); return folly::to(str); } - const gflags::CommandLineFlagInfo& info() const { return info_; } + const folly::gflags::CommandLineFlagInfo& info() const { return info_; } private: - gflags::CommandLineFlagInfo info_; + folly::gflags::CommandLineFlagInfo info_; bool isSet_; }; @@ -181,7 +181,7 @@ const std::string& getName(const std::string& name) { template void addGFlag( - gflags::CommandLineFlagInfo&& flag, + folly::gflags::CommandLineFlagInfo&& flag, po::options_description& desc, ProgramOptionsStyle style) { auto gflagInfo = std::make_shared>(std::move(flag)); @@ -203,7 +203,7 @@ void addGFlag( template <> void addGFlag( - gflags::CommandLineFlagInfo&& flag, + folly::gflags::CommandLineFlagInfo&& flag, po::options_description& desc, ProgramOptionsStyle style) { auto gflagInfo = std::make_shared>(std::move(flag)); @@ -233,7 +233,7 @@ void addGFlag( } typedef void (*FlagAdder)( - gflags::CommandLineFlagInfo&&, + folly::gflags::CommandLineFlagInfo&&, po::options_description&, ProgramOptionsStyle); @@ -272,8 +272,8 @@ po::options_description getGFlags(ProgramOptionsStyle style) { po::options_description desc("GFlags"); - std::vector allFlags; - gflags::GetAllFlags(&allFlags); + std::vector allFlags; + folly::gflags::GetAllFlags(&allFlags); for (auto& f : allFlags) { if (gSkipFlags.count(f.name)) { diff --git a/folly/compression/elias_fano/test/BitVectorCodingTest.cpp b/folly/compression/elias_fano/test/BitVectorCodingTest.cpp index f38aed66969..5c1abf8e4ab 100644 --- a/folly/compression/elias_fano/test/BitVectorCodingTest.cpp +++ b/folly/compression/elias_fano/test/BitVectorCodingTest.cpp @@ -202,7 +202,6 @@ Encode 10.88ms 91.90 int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); folly::Init init(&argc, &argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (ret == 0 && FLAGS_benchmark) { diff --git a/folly/compression/elias_fano/test/EliasFanoCodingTest.cpp b/folly/compression/elias_fano/test/EliasFanoCodingTest.cpp index c4efb7eb218..25cbcc319ab 100644 --- a/folly/compression/elias_fano/test/EliasFanoCodingTest.cpp +++ b/folly/compression/elias_fano/test/EliasFanoCodingTest.cpp @@ -403,7 +403,6 @@ slowDefaultNumLowerBits 10.88ns 91.90M int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); folly::Init init(&argc, &argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (ret == 0 && FLAGS_benchmark) { diff --git a/folly/concurrency/memory/test/AtomicReadMostlyMainPtrBenchmark.cpp b/folly/concurrency/memory/test/AtomicReadMostlyMainPtrBenchmark.cpp index c3ae20002d2..ed313960e32 100644 --- a/folly/concurrency/memory/test/AtomicReadMostlyMainPtrBenchmark.cpp +++ b/folly/concurrency/memory/test/AtomicReadMostlyMainPtrBenchmark.cpp @@ -40,7 +40,7 @@ BENCHMARK(SingleThreadedStores, n) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/concurrency/memory/test/ReadMostlySharedPtrBenchmark.cpp b/folly/concurrency/memory/test/ReadMostlySharedPtrBenchmark.cpp index 3ba1316fa76..2f28dbe0c45 100644 --- a/folly/concurrency/memory/test/ReadMostlySharedPtrBenchmark.cpp +++ b/folly/concurrency/memory/test/ReadMostlySharedPtrBenchmark.cpp @@ -128,9 +128,9 @@ BENCHMARK_RELATIVE(TLReadMostlyMainPtrDtor, n) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_min_usec", "100000", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_usec", "100000", folly::gflags::SET_FLAG_IF_DEFAULT); folly::runBenchmarks(); diff --git a/folly/concurrency/memory/test/RefCountBenchmark.cpp b/folly/concurrency/memory/test/RefCountBenchmark.cpp index 76f87ee155f..e04b51d278b 100644 --- a/folly/concurrency/memory/test/RefCountBenchmark.cpp +++ b/folly/concurrency/memory/test/RefCountBenchmark.cpp @@ -80,9 +80,9 @@ BENCHMARK(AtomicTwentyFourThreads, n) { } // namespace folly int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_min_usec", "100000", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_usec", "100000", folly::gflags::SET_FLAG_IF_DEFAULT); folly::runBenchmarks(); diff --git a/folly/concurrency/test/CacheLocalityBenchmark.cpp b/folly/concurrency/test/CacheLocalityBenchmark.cpp index 27d2c63de93..9c85c9977d1 100644 --- a/folly/concurrency/test/CacheLocalityBenchmark.cpp +++ b/folly/concurrency/test/CacheLocalityBenchmark.cpp @@ -386,7 +386,7 @@ BENCHMARK_NAMED_PARAM(contentionAtWidthGetcpu, 32_stripe_1000_work, 32, 1000) BENCHMARK_NAMED_PARAM(atomicIncrBaseline, local_incr_1000_work, 1000) int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/concurrency/test/CoreCachedSharedPtrTest.cpp b/folly/concurrency/test/CoreCachedSharedPtrTest.cpp index f5e2f1deeef..b12df1248b2 100644 --- a/folly/concurrency/test/CoreCachedSharedPtrTest.cpp +++ b/folly/concurrency/test/CoreCachedSharedPtrTest.cpp @@ -321,7 +321,7 @@ BENCHMARK_MULTI(AtomicCoreCachedSharedPtrSingleThreadReset) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (ret == 0 && FLAGS_benchmark) { diff --git a/folly/concurrency/test/ThreadCachedSynchronizedBench.cpp b/folly/concurrency/test/ThreadCachedSynchronizedBench.cpp index 5cb50dc4c2c..a7ec1ec16fc 100644 --- a/folly/concurrency/test/ThreadCachedSynchronizedBench.cpp +++ b/folly/concurrency/test/ThreadCachedSynchronizedBench.cpp @@ -70,7 +70,7 @@ BENCHMARK(read_int_thread_cached_synchronized, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/container/test/EvictingCacheMapBench.cpp b/folly/container/test/EvictingCacheMapBench.cpp index 6310d29ee9b..20b8e2ffbc4 100644 --- a/folly/container/test/EvictingCacheMapBench.cpp +++ b/folly/container/test/EvictingCacheMapBench.cpp @@ -75,6 +75,6 @@ BENCHMARK_PARAM(insertCache, 1754650) // 1.75M BENCHMARK_PARAM(insertCache, 11356334) // 11.3M int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); } diff --git a/folly/container/test/FBVectorBenchmark.cpp b/folly/container/test/FBVectorBenchmark.cpp index 4a7f69aa056..8d598546f47 100644 --- a/folly/container/test/FBVectorBenchmark.cpp +++ b/folly/container/test/FBVectorBenchmark.cpp @@ -94,13 +94,13 @@ using FBStringFBVector = fbvector; #undef VECTOR int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_max_iters", "1000000", gflags::SET_FLAG_IF_DEFAULT); - gflags::SetCommandLineOptionWithMode( - "bm_min_iters", "100000", gflags::SET_FLAG_IF_DEFAULT); - gflags::SetCommandLineOptionWithMode( - "bm_max_secs", "1", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_iters", "1000000", folly::gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_iters", "100000", folly::gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_secs", "1", folly::gflags::SET_FLAG_IF_DEFAULT); folly::runBenchmarks(); return 0; diff --git a/folly/container/test/HashMapsBench.cpp b/folly/container/test/HashMapsBench.cpp index f8e04ddd6c7..4d5850d48e5 100644 --- a/folly/container/test/HashMapsBench.cpp +++ b/folly/container/test/HashMapsBench.cpp @@ -444,12 +444,12 @@ void runAllHashMapTests() { int main(int argc, char** argv) { folly::Init init(&argc, &argv); - gflags::SetCommandLineOptionWithMode( - "bm_max_iters", "100000", gflags::SET_FLAG_IF_DEFAULT); - gflags::SetCommandLineOptionWithMode( - "bm_min_iters", "10000", gflags::SET_FLAG_IF_DEFAULT); - gflags::SetCommandLineOptionWithMode( - "bm_max_secs", "1", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_iters", "100000", folly::gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_iters", "10000", folly::gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_secs", "1", folly::gflags::SET_FLAG_IF_DEFAULT); LOG(INFO) << "Preparing benchmark..."; runAllHashMapTests(); LOG(INFO) << "Running benchmark, which could take tens of minutes..."; diff --git a/folly/container/test/SparseByteSetBenchmark.cpp b/folly/container/test/SparseByteSetBenchmark.cpp index c59a88b863f..b5ab4e6b3d4 100644 --- a/folly/container/test/SparseByteSetBenchmark.cpp +++ b/folly/container/test/SparseByteSetBenchmark.cpp @@ -147,7 +147,7 @@ void setup_rand_bench() { } // namespace int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); setup_rand_bench(); runBenchmarks(); return 0; diff --git a/folly/coro/test/AsyncGeneratorBenchmark.cpp b/folly/coro/test/AsyncGeneratorBenchmark.cpp index 0bf4c134167..7c8a0e2b222 100644 --- a/folly/coro/test/AsyncGeneratorBenchmark.cpp +++ b/folly/coro/test/AsyncGeneratorBenchmark.cpp @@ -145,7 +145,7 @@ BENCHMARK(compareToSynchronousGeneratorYieldValues, iters) { #endif int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/BlockingWaitBenchmark.cpp b/folly/coro/test/BlockingWaitBenchmark.cpp index 72cc96d8d0d..7b59ae0011a 100644 --- a/folly/coro/test/BlockingWaitBenchmark.cpp +++ b/folly/coro/test/BlockingWaitBenchmark.cpp @@ -78,7 +78,7 @@ BENCHMARK(blockingWaitRVO, iters) { #endif int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/CollectAllBenchmark.cpp b/folly/coro/test/CollectAllBenchmark.cpp index fd15feaef04..a5d101263f2 100644 --- a/folly/coro/test/CollectAllBenchmark.cpp +++ b/folly/coro/test/CollectAllBenchmark.cpp @@ -121,7 +121,7 @@ BENCHMARK(collectAllBaton100, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/CoroBenchmarkAllocator.cpp b/folly/coro/test/CoroBenchmarkAllocator.cpp index 6d6668ffd65..cd6acb2ab20 100644 --- a/folly/coro/test/CoroBenchmarkAllocator.cpp +++ b/folly/coro/test/CoroBenchmarkAllocator.cpp @@ -325,7 +325,7 @@ BENCHMARK(recursionDepth1000, iters) { #endif int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/CoroBenchmarkNRVO.cpp b/folly/coro/test/CoroBenchmarkNRVO.cpp index 1ec52c1b3fe..e44ae955aa6 100644 --- a/folly/coro/test/CoroBenchmarkNRVO.cpp +++ b/folly/coro/test/CoroBenchmarkNRVO.cpp @@ -195,7 +195,7 @@ BENCHMARK(NRVOTenAwaits, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/PromiseBenchmark.cpp b/folly/coro/test/PromiseBenchmark.cpp index 85fb2a53705..dd55e0af352 100644 --- a/folly/coro/test/PromiseBenchmark.cpp +++ b/folly/coro/test/PromiseBenchmark.cpp @@ -124,7 +124,7 @@ BENCHMARK_COUNTERS(FuturesFutureSuspend, counters, iters) { #endif int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/coro/test/TaskBenchmark.cpp b/folly/coro/test/TaskBenchmark.cpp index ff9e33be25f..3767ac6cb14 100644 --- a/folly/coro/test/TaskBenchmark.cpp +++ b/folly/coro/test/TaskBenchmark.cpp @@ -161,7 +161,7 @@ BENCHMARK(NestedCallsWithCancellation10, iters) { #endif // FOLLY_HAS_COROUTINES int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/debugging/exception_tracer/test/ExceptionTracerBenchmark.cpp b/folly/debugging/exception_tracer/test/ExceptionTracerBenchmark.cpp index fd7ee0b5c51..dfeb574cb4f 100644 --- a/folly/debugging/exception_tracer/test/ExceptionTracerBenchmark.cpp +++ b/folly/debugging/exception_tracer/test/ExceptionTracerBenchmark.cpp @@ -59,7 +59,7 @@ BENCHMARK(ExceptionTracer, iters) { #endif // FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); folly::runBenchmarks(); return 0; diff --git a/folly/debugging/symbolizer/test/DwarfBenchmark.cpp b/folly/debugging/symbolizer/test/DwarfBenchmark.cpp index 4e4d9eb6399..66e19f1c1da 100644 --- a/folly/debugging/symbolizer/test/DwarfBenchmark.cpp +++ b/folly/debugging/symbolizer/test/DwarfBenchmark.cpp @@ -79,7 +79,7 @@ BENCHMARK(DwarfFindAddressFullWithInline, n) { #endif // FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); folly::runBenchmarksOnFlag(); return 0; diff --git a/folly/detail/test/ThreadLocalBenchmark.cpp b/folly/detail/test/ThreadLocalBenchmark.cpp index 019c2427584..b87bddbac89 100644 --- a/folly/detail/test/ThreadLocalBenchmark.cpp +++ b/folly/detail/test/ThreadLocalBenchmark.cpp @@ -110,7 +110,7 @@ BENCHMARK_NAMED_PARAM(accessAllThreads, 2000t_20000c_50s, 2000, 20000, 50) BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/executors/test/EDFThreadPoolExecutorBenchmark.cpp b/folly/executors/test/EDFThreadPoolExecutorBenchmark.cpp index 3e5b9229d61..39303593362 100644 --- a/folly/executors/test/EDFThreadPoolExecutorBenchmark.cpp +++ b/folly/executors/test/EDFThreadPoolExecutorBenchmark.cpp @@ -195,7 +195,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM( multiThreaded, EDFEx, std::make_unique(kNumThreads)) int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/executors/test/GlobalCPUExecutorTest.cpp b/folly/executors/test/GlobalCPUExecutorTest.cpp index 0e533d3b039..88202f4760f 100644 --- a/folly/executors/test/GlobalCPUExecutorTest.cpp +++ b/folly/executors/test/GlobalCPUExecutorTest.cpp @@ -23,7 +23,7 @@ #include TEST(GlobalCPUExecutorTest, CPUThreadCountFlagSet) { - gflags::FlagSaver flagsaver; + folly::gflags::FlagSaver flagsaver; FLAGS_folly_global_cpu_executor_threads = 100; auto cpu_threadpool = dynamic_cast( diff --git a/folly/executors/test/GlobalExecutorTest.cpp b/folly/executors/test/GlobalExecutorTest.cpp index 2926568e63d..56e091c5eba 100644 --- a/folly/executors/test/GlobalExecutorTest.cpp +++ b/folly/executors/test/GlobalExecutorTest.cpp @@ -119,7 +119,7 @@ TEST(GlobalExecutorTest, GlobalIOExecutor) { } TEST(GlobalExecutorTest, IOThreadCountFlagUnset) { - gflags::FlagSaver flagsaver; + folly::gflags::FlagSaver flagsaver; auto io_threadpool = dynamic_cast( folly::getGlobalIOExecutor().get()); @@ -128,7 +128,7 @@ TEST(GlobalExecutorTest, IOThreadCountFlagUnset) { } TEST(GlobalExecutorTest, CPUThreadCountFlagUnset) { - gflags::FlagSaver flagsaver; + folly::gflags::FlagSaver flagsaver; EXPECT_EQ( getGlobalCPUExecutorCounters().numThreads, folly::hardware_concurrency()); diff --git a/folly/executors/test/GlobalIOExecutorTest.cpp b/folly/executors/test/GlobalIOExecutorTest.cpp index eff0e5a95f0..11aa9cbc7a8 100644 --- a/folly/executors/test/GlobalIOExecutorTest.cpp +++ b/folly/executors/test/GlobalIOExecutorTest.cpp @@ -26,7 +26,7 @@ using namespace folly; TEST(GlobalExecutorTest, IOThreadCountFlagSet) { - gflags::FlagSaver flagsaver; + folly::gflags::FlagSaver flagsaver; FLAGS_folly_global_io_executor_threads = 100; auto io_threadpool = dynamic_cast( diff --git a/folly/futures/test/Benchmark.cpp b/folly/futures/test/Benchmark.cpp index eaebaea5f6e..c1a758914bf 100644 --- a/folly/futures/test/Benchmark.cpp +++ b/folly/futures/test/Benchmark.cpp @@ -462,7 +462,7 @@ BENCHMARK_RELATIVE(complexBlob4096) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/BaseBenchmark.cpp b/folly/gen/test/BaseBenchmark.cpp index 7abbbd2668c..85fc01706ab 100644 --- a/folly/gen/test/BaseBenchmark.cpp +++ b/folly/gen/test/BaseBenchmark.cpp @@ -362,7 +362,7 @@ BENCHMARK(Sample, iters) { // ============================================================================ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/FileBenchmark.cpp b/folly/gen/test/FileBenchmark.cpp index a0f34b23473..3e20140f44d 100644 --- a/folly/gen/test/FileBenchmark.cpp +++ b/folly/gen/test/FileBenchmark.cpp @@ -67,7 +67,7 @@ BENCHMARK(ByLine_Pipes, iters) { // ============================================================================ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/ParallelBenchmark.cpp b/folly/gen/test/ParallelBenchmark.cpp index 26724527bd7..3bdcf29cf18 100644 --- a/folly/gen/test/ParallelBenchmark.cpp +++ b/folly/gen/test/ParallelBenchmark.cpp @@ -168,7 +168,7 @@ seq(1, fibs) | parallel(map([](int) { return fi 1698.07% 87.96ms 11.37 ============================================================================ #endif int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/ParallelMapBenchmark.cpp b/folly/gen/test/ParallelMapBenchmark.cpp index f308b452d45..6f73c042d67 100644 --- a/folly/gen/test/ParallelMapBenchmark.cpp +++ b/folly/gen/test/ParallelMapBenchmark.cpp @@ -86,7 +86,7 @@ BENCHMARK_RELATIVE(FibSumThreads, n) { */ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/StringBenchmark.cpp b/folly/gen/test/StringBenchmark.cpp index 115203238e2..8f26a3f5947 100644 --- a/folly/gen/test/StringBenchmark.cpp +++ b/folly/gen/test/StringBenchmark.cpp @@ -344,7 +344,7 @@ BENCHMARK_RELATIVE(Records_VectorString, iters) { // ============================================================================ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); initStringResplitterBenchmark(); runBenchmarks(); return 0; diff --git a/folly/hash/test/ChecksumBenchmark.cpp b/folly/hash/test/ChecksumBenchmark.cpp index bdbfcf3cd83..ad04cf751ac 100644 --- a/folly/hash/test/ChecksumBenchmark.cpp +++ b/folly/hash/test/ChecksumBenchmark.cpp @@ -58,7 +58,7 @@ BENCH_CRC32C(262144) BENCH_CRC32C(524288) int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); buf = static_cast(folly::aligned_malloc(kBufSize + 64, 4096)); diff --git a/folly/hash/test/ChecksumTest.cpp b/folly/hash/test/ChecksumTest.cpp index 65c013fed97..c2d5b043238 100644 --- a/folly/hash/test/ChecksumTest.cpp +++ b/folly/hash/test/ChecksumTest.cpp @@ -566,7 +566,7 @@ BENCHMARK(crc32c_combine_512KB_block, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); // Populate a buffer with a deterministic pattern // on which to compute checksums diff --git a/folly/hash/test/HashBenchmark.cpp b/folly/hash/test/HashBenchmark.cpp index bdded45fb08..c8ae211007b 100644 --- a/folly/hash/test/HashBenchmark.cpp +++ b/folly/hash/test/HashBenchmark.cpp @@ -114,7 +114,7 @@ struct MurmurHash { } // namespace detail int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); std::deque names; // Backing for benchmark names. diff --git a/folly/init/Init.cpp b/folly/init/Init.cpp index 82d7ecbf889..73485b0ad69 100644 --- a/folly/init/Init.cpp +++ b/folly/init/Init.cpp @@ -82,7 +82,7 @@ void initImpl(int* argc, char*** argv, InitOptions options) { (void)options; #else if (options.use_gflags) { - gflags::ParseCommandLineFlags(argc, argv, options.remove_flags); + folly::gflags::ParseCommandLineFlags(argc, argv, options.remove_flags); } #endif diff --git a/folly/io/async/test/EventBaseBenchmark.cpp b/folly/io/async/test/EventBaseBenchmark.cpp index 9770a3c5594..40fbd522f4d 100644 --- a/folly/io/async/test/EventBaseBenchmark.cpp +++ b/folly/io/async/test/EventBaseBenchmark.cpp @@ -69,6 +69,6 @@ BENCHMARK_RELATIVE(timeMeasurementsOff, n) { */ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); } diff --git a/folly/io/async/test/HHWheelTimerHighResBenchmark.cpp b/folly/io/async/test/HHWheelTimerHighResBenchmark.cpp index 8166de4458a..d8dfc127192 100644 --- a/folly/io/async/test/HHWheelTimerHighResBenchmark.cpp +++ b/folly/io/async/test/HHWheelTimerHighResBenchmark.cpp @@ -168,7 +168,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM_MULTI( BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/io/async/test/IOBenchmark.cpp b/folly/io/async/test/IOBenchmark.cpp index dc6824987a2..e2421cf569b 100644 --- a/folly/io/async/test/IOBenchmark.cpp +++ b/folly/io/async/test/IOBenchmark.cpp @@ -223,7 +223,7 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { getTempFile(kNumBlocks); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/io/async/test/NotificationQueueBenchmark.cpp b/folly/io/async/test/NotificationQueueBenchmark.cpp index 460e161e3ae..c102d8cc2a2 100644 --- a/folly/io/async/test/NotificationQueueBenchmark.cpp +++ b/folly/io/async/test/NotificationQueueBenchmark.cpp @@ -234,7 +234,7 @@ BENCHMARK_NAMED_PARAM(multiProducerMultiConsumerNQ, 32p_32c, 32, 32) BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/io/async/test/RegisteredFdBenchmark.cpp b/folly/io/async/test/RegisteredFdBenchmark.cpp index 6c935662ef3..9548c1dfad5 100644 --- a/folly/io/async/test/RegisteredFdBenchmark.cpp +++ b/folly/io/async/test/RegisteredFdBenchmark.cpp @@ -141,6 +141,6 @@ BENCHMARK_RELATIVE_NAMED_PARAM( BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); } diff --git a/folly/io/async/test/RequestContextBenchmark.cpp b/folly/io/async/test/RequestContextBenchmark.cpp index c18853754ee..c34dd57510c 100644 --- a/folly/io/async/test/RequestContextBenchmark.cpp +++ b/folly/io/async/test/RequestContextBenchmark.cpp @@ -279,7 +279,7 @@ void benches() { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); benches(); } diff --git a/folly/io/async/test/SocketClient.cpp b/folly/io/async/test/SocketClient.cpp index 8dbf0d6722e..f1fb1ff1936 100644 --- a/folly/io/async/test/SocketClient.cpp +++ b/folly/io/async/test/SocketClient.cpp @@ -33,7 +33,7 @@ DEFINE_int32(sendtimeout_ms, 0, "send timeout"); DEFINE_int32(num_writes, 1, "number of writes"); int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_port == 0) { LOG(ERROR) << "Must specify port"; diff --git a/folly/io/async/test/ZeroCopyBenchmark.cpp b/folly/io/async/test/ZeroCopyBenchmark.cpp index 02fac4d0312..e69de4ec0e2 100644 --- a/folly/io/async/test/ZeroCopyBenchmark.cpp +++ b/folly/io/async/test/ZeroCopyBenchmark.cpp @@ -130,7 +130,7 @@ DEFINE_int32(port, 33130, "port"); DEFINE_string(host, "::1", "host"); int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_client) { runClient( diff --git a/folly/io/test/IOBufBenchmark.cpp b/folly/io/test/IOBufBenchmark.cpp index d50261dba62..39848156d24 100644 --- a/folly/io/test/IOBufBenchmark.cpp +++ b/folly/io/test/IOBufBenchmark.cpp @@ -178,7 +178,7 @@ BENCHMARK_DRAW_LINE(); */ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/io/test/IOBufCursorBenchmark.cpp b/folly/io/test/IOBufCursorBenchmark.cpp index 31475b97fc1..ab5ab5b34ec 100644 --- a/folly/io/test/IOBufCursorBenchmark.cpp +++ b/folly/io/test/IOBufCursorBenchmark.cpp @@ -207,7 +207,7 @@ BENCHMARK_RELATIVE(prefix, iters) { */ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); iobuf_benchmark = IOBuf::create(benchmark_size); iobuf_benchmark->append(benchmark_size); diff --git a/folly/io/test/NetworkBenchmark.cpp b/folly/io/test/NetworkBenchmark.cpp index d1aaf2a14d1..b0ab14cd99a 100644 --- a/folly/io/test/NetworkBenchmark.cpp +++ b/folly/io/test/NetworkBenchmark.cpp @@ -148,7 +148,7 @@ chainBenchmark 100000 118.6 ms 1.186 us 823.2 k poolBenchmark 100000 32.2 ms 322 ns 2.962 M */ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); setNumbers(10, 10); folly::runBenchmarks(); diff --git a/folly/io/test/QueueAppenderBenchmark.cpp b/folly/io/test/QueueAppenderBenchmark.cpp index 16e45a4fa62..6259456a2a8 100644 --- a/folly/io/test/QueueAppenderBenchmark.cpp +++ b/folly/io/test/QueueAppenderBenchmark.cpp @@ -130,7 +130,7 @@ BENCHMARK(preallocate_postallocate_256b, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/io/test/RecordIOTest.cpp b/folly/io/test/RecordIOTest.cpp index d590b8de485..05c2f635eb5 100644 --- a/folly/io/test/RecordIOTest.cpp +++ b/folly/io/test/RecordIOTest.cpp @@ -333,6 +333,6 @@ TEST(RecordIOTest, validateRecordAPI) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/io/tool/HugePageUtil.cpp b/folly/io/tool/HugePageUtil.cpp index e532f37450a..278a601f4a5 100644 --- a/folly/io/tool/HugePageUtil.cpp +++ b/folly/io/tool/HugePageUtil.cpp @@ -62,7 +62,7 @@ void list() { } // namespace int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_cp) { if (argc != 3) { usage(argv[0]); diff --git a/folly/json/test/DynamicOtherTest.cpp b/folly/json/test/DynamicOtherTest.cpp index 0e5a9146405..2558bbd5e43 100644 --- a/folly/json/test/DynamicOtherTest.cpp +++ b/folly/json/test/DynamicOtherTest.cpp @@ -339,6 +339,6 @@ TEST(Dynamic, FormattedIO) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/json/test/JsonBenchmark.cpp b/folly/json/test/JsonBenchmark.cpp index 6bde7a49b94..502f7341d09 100644 --- a/folly/json/test/JsonBenchmark.cpp +++ b/folly/json/test/JsonBenchmark.cpp @@ -258,7 +258,7 @@ BENCHMARK(PerfObj2Json, iters) { // PerfObj2Json 265.90us 3.76K int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/lang/test/BitsBenchmark.cpp b/folly/lang/test/BitsBenchmark.cpp index c49a5c27617..ea898b4d0c9 100644 --- a/folly/lang/test/BitsBenchmark.cpp +++ b/folly/lang/test/BitsBenchmark.cpp @@ -140,7 +140,7 @@ BENCHMARK(PartialLoadUnalignedSwitch, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/lang/test/BitsClassBenchmark.cpp b/folly/lang/test/BitsClassBenchmark.cpp index 882355d9d3f..2717ef771ef 100644 --- a/folly/lang/test/BitsClassBenchmark.cpp +++ b/folly/lang/test/BitsClassBenchmark.cpp @@ -116,7 +116,7 @@ benchmarkGet(i64) 85.78% 8.53ns 117.16M #endif int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return sum.load(); } diff --git a/folly/lang/test/BitsClassTest.cpp b/folly/lang/test/BitsClassTest.cpp index 963a1c38da4..bc019e02924 100644 --- a/folly/lang/test/BitsClassTest.cpp +++ b/folly/lang/test/BitsClassTest.cpp @@ -374,6 +374,6 @@ TEST(Bits, ConcatenationAligned) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/lang/test/ExceptionBench.cpp b/folly/lang/test/ExceptionBench.cpp index f9dd11ce6b0..428b54071ca 100644 --- a/folly/lang/test/ExceptionBench.cpp +++ b/folly/lang/test/ExceptionBench.cpp @@ -421,7 +421,7 @@ BENCHMARK(try_get_object_exact_fast_vmi_pass, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/lang/test/ToAsciiBench.cpp b/folly/lang/test/ToAsciiBench.cpp index 3db779d4670..a3632bed2f4 100644 --- a/folly/lang/test/ToAsciiBench.cpp +++ b/folly/lang/test/ToAsciiBench.cpp @@ -460,7 +460,7 @@ BENCHMARK_GROUP(16) #undef BENCHMARK_GROUP int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/logging/test/InitTest.cpp b/folly/logging/test/InitTest.cpp index e70fca4f5eb..1f1971ea430 100644 --- a/folly/logging/test/InitTest.cpp +++ b/folly/logging/test/InitTest.cpp @@ -83,7 +83,7 @@ TEST(Init, checkConfig) { // not been called yet when we start running the tests. int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, /* remove_flags = */ true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, /* remove_flags = */ true); return RUN_ALL_TESTS(); } diff --git a/folly/memory/test/ArenaTest.cpp b/folly/memory/test/ArenaTest.cpp index 91fd5c843a1..c70df02a940 100644 --- a/folly/memory/test/ArenaTest.cpp +++ b/folly/memory/test/ArenaTest.cpp @@ -348,7 +348,7 @@ TEST(Arena, Merge) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); return ret; } diff --git a/folly/memory/test/MallocBenchmark.cpp b/folly/memory/test/MallocBenchmark.cpp index 1f9dcaa3409..295f302787e 100644 --- a/folly/memory/test/MallocBenchmark.cpp +++ b/folly/memory/test/MallocBenchmark.cpp @@ -84,7 +84,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM( uniform_0_128, goodMallocSize, folly::goodMallocSize) int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); folly::runBenchmarks(); return 0; diff --git a/folly/memory/test/ThreadCachedArenaTest.cpp b/folly/memory/test/ThreadCachedArenaTest.cpp index 4c36de1e529..0d28fcede31 100644 --- a/folly/memory/test/ThreadCachedArenaTest.cpp +++ b/folly/memory/test/ThreadCachedArenaTest.cpp @@ -267,7 +267,7 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/portability/GFlags.h b/folly/portability/GFlags.h index 0e7583d9f36..3a7fa6771c6 100644 --- a/folly/portability/GFlags.h +++ b/folly/portability/GFlags.h @@ -114,26 +114,25 @@ #endif -#if FOLLY_UNUSUAL_GFLAGS_NAMESPACE -namespace FOLLY_GFLAGS_NAMESPACE {} -namespace gflags { -using namespace FOLLY_GFLAGS_NAMESPACE; -} // namespace gflags -#endif - namespace folly { #if FOLLY_HAVE_LIBGFLAGS && __has_include() -using FlagSaver = gflags::FlagSaver; +#if !defined(GFLAGS_NAMESPACE) +#error expecting definition of GFLAGS_NAMESPACE +#endif +namespace gflags = ::GFLAGS_NAMESPACE; #else -namespace detail { -struct GflagsFlagSaver {}; -} // namespace detail -using FlagSaver = detail::GflagsFlagSaver; +namespace gflags { + +struct FlagSaver {}; + +} // namespace gflags #endif +using gflags::FlagSaver; + } // namespace folly diff --git a/folly/stats/test/BucketedTimeSeriesBenchmark.cpp b/folly/stats/test/BucketedTimeSeriesBenchmark.cpp index e242375d5e3..80abaedfb12 100644 --- a/folly/stats/test/BucketedTimeSeriesBenchmark.cpp +++ b/folly/stats/test/BucketedTimeSeriesBenchmark.cpp @@ -73,7 +73,7 @@ BENCHMARK_NAMED_PARAM(addValue, 71x5_100perSec, seconds(71), 5, 100) BENCHMARK_NAMED_PARAM(addValue, 1x1_100perSec, seconds(1), 1, 100) int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/stats/test/DigestBuilderBenchmark.cpp b/folly/stats/test/DigestBuilderBenchmark.cpp index 829fa9246e1..c08e3c34801 100644 --- a/folly/stats/test/DigestBuilderBenchmark.cpp +++ b/folly/stats/test/DigestBuilderBenchmark.cpp @@ -122,7 +122,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(append, 10000x32, 10000, 32) */ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/stats/test/HistogramBenchmark.cpp b/folly/stats/test/HistogramBenchmark.cpp index 0d079141b5c..3ceda6b5870 100644 --- a/folly/stats/test/HistogramBenchmark.cpp +++ b/folly/stats/test/HistogramBenchmark.cpp @@ -39,7 +39,7 @@ BENCHMARK_NAMED_PARAM(addValue, 0_to_1000, 10, 0, 1000) BENCHMARK_NAMED_PARAM(addValue, 5k_to_20k, 250, 5000, 20000) int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/stats/test/QuantileEstimatorBenchmark.cpp b/folly/stats/test/QuantileEstimatorBenchmark.cpp index 8049a46a8a7..e8bf00b8203 100644 --- a/folly/stats/test/QuantileEstimatorBenchmark.cpp +++ b/folly/stats/test/QuantileEstimatorBenchmark.cpp @@ -72,7 +72,7 @@ BENCHMARK_NAMED_PARAM(addValueMultithreaded, 16, 16) BENCHMARK_NAMED_PARAM(addValueMultithreaded, 32, 32) int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/stats/test/QuantileHistogramBenchmark.cpp b/folly/stats/test/QuantileHistogramBenchmark.cpp index 7418d635746..21cc34adb6b 100644 --- a/folly/stats/test/QuantileHistogramBenchmark.cpp +++ b/folly/stats/test/QuantileHistogramBenchmark.cpp @@ -203,7 +203,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM(estimateQuantile, p99, 100, 0.99) BENCHMARK_RELATIVE_NAMED_PARAM(estimateQuantile, p999, 100, 0.999) int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/stats/test/TDigestBenchmark.cpp b/folly/stats/test/TDigestBenchmark.cpp index a61c2746b77..fa98ace639f 100644 --- a/folly/stats/test/TDigestBenchmark.cpp +++ b/folly/stats/test/TDigestBenchmark.cpp @@ -225,7 +225,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM(estimateQuantile, 1000_p999, 1000, 0.999) */ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/synchronization/test/BatonBenchmark.cpp b/folly/synchronization/test/BatonBenchmark.cpp index b2e2e3ee0c6..4851dc1b786 100644 --- a/folly/synchronization/test/BatonBenchmark.cpp +++ b/folly/synchronization/test/BatonBenchmark.cpp @@ -71,7 +71,7 @@ BENCHMARK(native_sem_pingpong, iters) { // to the required futex calls for the blocking case int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/synchronization/test/CallOnceBenchmark.cpp b/folly/synchronization/test/CallOnceBenchmark.cpp index 6cc74cdea9e..f066fc69b77 100644 --- a/folly/synchronization/test/CallOnceBenchmark.cpp +++ b/folly/synchronization/test/CallOnceBenchmark.cpp @@ -66,7 +66,7 @@ FollyCallOnceBench 651.94ps 1.53G */ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/synchronization/test/LifoSemBench.cpp b/folly/synchronization/test/LifoSemBench.cpp index af315e22a26..1539786172d 100644 --- a/folly/synchronization/test/LifoSemBench.cpp +++ b/folly/synchronization/test/LifoSemBench.cpp @@ -179,7 +179,7 @@ BENCHMARK_NAMED_PARAM(contendedUse, 32_to_1000, 32, 1000) // ============================================================================ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarksOnFlag(); return 0; } diff --git a/folly/synchronization/test/LifoSemTests.cpp b/folly/synchronization/test/LifoSemTests.cpp index 21e03aae270..9f8ea3978cf 100644 --- a/folly/synchronization/test/LifoSemTests.cpp +++ b/folly/synchronization/test/LifoSemTests.cpp @@ -347,7 +347,7 @@ TEST_F(LifoSemTest, shutdown_try_wait_for) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); int rv = RUN_ALL_TESTS(); return rv; } diff --git a/folly/synchronization/test/ParkingLotBenchmark.cpp b/folly/synchronization/test/ParkingLotBenchmark.cpp index 420ef0eccd2..9041d2bc4bc 100644 --- a/folly/synchronization/test/ParkingLotBenchmark.cpp +++ b/folly/synchronization/test/ParkingLotBenchmark.cpp @@ -206,7 +206,7 @@ BENCHMARK_RELATIVE(ParkingLotWakeAll, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/synchronization/test/RcuBench.cpp b/folly/synchronization/test/RcuBench.cpp index 97aa4cdb574..13e6c67d442 100644 --- a/folly/synchronization/test/RcuBench.cpp +++ b/folly/synchronization/test/RcuBench.cpp @@ -59,7 +59,7 @@ BENCHMARK(RcuRetire, iters) { } int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/synchronization/test/SmallLocksBenchmark.cpp b/folly/synchronization/test/SmallLocksBenchmark.cpp index eb1d842988c..897472264cd 100644 --- a/folly/synchronization/test/SmallLocksBenchmark.cpp +++ b/folly/synchronization/test/SmallLocksBenchmark.cpp @@ -735,7 +735,7 @@ void fairnessTest(std::string type, std::size_t numThreads) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_run_fairness) { for (auto numThreads : {2, 4, 8, 16, 32, 64}) { diff --git a/folly/synchronization/test/ThreadCachedReadersBench.cpp b/folly/synchronization/test/ThreadCachedReadersBench.cpp index 3b702a1cd8e..11f738bf43c 100644 --- a/folly/synchronization/test/ThreadCachedReadersBench.cpp +++ b/folly/synchronization/test/ThreadCachedReadersBench.cpp @@ -35,7 +35,7 @@ BENCHMARK(IncrementDecrementSeparateLoop, iters) { BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/synchronization/test/ThrottledLifoSemTest.cpp b/folly/synchronization/test/ThrottledLifoSemTest.cpp index e6e1e627f8c..b9dcca54a10 100644 --- a/folly/synchronization/test/ThrottledLifoSemTest.cpp +++ b/folly/synchronization/test/ThrottledLifoSemTest.cpp @@ -236,7 +236,7 @@ BENCHMARK_NAMED_PARAM(post, 8_threads, 8) int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); int rv = RUN_ALL_TESTS(); folly::runBenchmarksOnFlag(); return rv; diff --git a/folly/system/test/ThreadIdTest.cpp b/folly/system/test/ThreadIdTest.cpp index 9d2dfb856c8..82b3a866466 100644 --- a/folly/system/test/ThreadIdTest.cpp +++ b/folly/system/test/ThreadIdTest.cpp @@ -93,7 +93,7 @@ BENCHMARK_FUN(getOSThreadIDSlow, detail::getOSThreadIDSlow) int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); int ret = RUN_ALL_TESTS(); if (ret == 0) { diff --git a/folly/test/AsciiCaseInsensitiveBenchmark.cpp b/folly/test/AsciiCaseInsensitiveBenchmark.cpp index 82df54638c9..7820ad18f77 100644 --- a/folly/test/AsciiCaseInsensitiveBenchmark.cpp +++ b/folly/test/AsciiCaseInsensitiveBenchmark.cpp @@ -114,7 +114,7 @@ BENCHMARK(CurrentCaseInsensitiveCheck, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); if (FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/AsciiCaseInsensitiveTest.cpp b/folly/test/AsciiCaseInsensitiveTest.cpp index 1e1bcfb1196..95cd13c4ab0 100644 --- a/folly/test/AsciiCaseInsensitiveTest.cpp +++ b/folly/test/AsciiCaseInsensitiveTest.cpp @@ -33,6 +33,6 @@ TEST(CaseInsensitiveMatch, CompareWithLegacy) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/AtomicHashMapTest.cpp b/folly/test/AtomicHashMapTest.cpp index ca82e601950..49ecce2d7c7 100644 --- a/folly/test/AtomicHashMapTest.cpp +++ b/folly/test/AtomicHashMapTest.cpp @@ -1068,13 +1068,13 @@ void benchmarkSetup() { string numIters = folly::to( std::min(1000000UL, (unsigned long)FLAGS_numBMElements)); - gflags::SetCommandLineOptionWithMode( - "bm_max_iters", numIters.c_str(), gflags::SET_FLAG_IF_DEFAULT); - gflags::SetCommandLineOptionWithMode( - "bm_min_iters", numIters.c_str(), gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_iters", numIters.c_str(), folly::gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_iters", numIters.c_str(), folly::gflags::SET_FLAG_IF_DEFAULT); string numCoresStr = folly::to(numCores); - gflags::SetCommandLineOptionWithMode( - "numThreads", numCoresStr.c_str(), gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "numThreads", numCoresStr.c_str(), folly::gflags::SET_FLAG_IF_DEFAULT); std::cout << "\nRunning AHM benchmarks on machine with " << numCores << " logical cores.\n" @@ -1086,7 +1086,7 @@ void benchmarkSetup() { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { benchmarkSetup(); diff --git a/folly/test/AtomicUnorderedMapTest.cpp b/folly/test/AtomicUnorderedMapTest.cpp index d7031ba9dda..19979a344b0 100644 --- a/folly/test/AtomicUnorderedMapTest.cpp +++ b/folly/test/AtomicUnorderedMapTest.cpp @@ -413,7 +413,7 @@ BENCHMARK(fast_map_64) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); int rv = RUN_ALL_TESTS(); folly::runBenchmarksOnFlag(); return rv; diff --git a/folly/test/BenchmarkIntegrationTest.cpp b/folly/test/BenchmarkIntegrationTest.cpp index f5871b9b837..0de718d5bc3 100644 --- a/folly/test/BenchmarkIntegrationTest.cpp +++ b/folly/test/BenchmarkIntegrationTest.cpp @@ -375,7 +375,7 @@ BENCHMARK(BenchmarkSuspender_dismissing_value, iter) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::addBenchmark("-", std::string("string_name"), [] { return 0; }); runBenchmarks(); runBenchmarksOnFlag(); diff --git a/folly/test/BenchmarkTest.cpp b/folly/test/BenchmarkTest.cpp index d3d7e5a7630..aee855cc7cd 100644 --- a/folly/test/BenchmarkTest.cpp +++ b/folly/test/BenchmarkTest.cpp @@ -78,7 +78,7 @@ struct BenchmarkingStateTest : ::testing::Test { } BenchmarkingStateForTests state; - gflags::FlagSaver flagSaver; + folly::gflags::FlagSaver flagSaver; }; TEST_F(BenchmarkingStateTest, Basic) { @@ -105,8 +105,8 @@ TEST_F(BenchmarkingStateTest, Basic) { // --bm_regex full match { - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_regex", "a1.*"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_regex", "a1.*"); const std::vector expected{ {__FILE__, "a1ns", 1, {}}, @@ -117,8 +117,8 @@ TEST_F(BenchmarkingStateTest, Basic) { // --bm_regex part match { - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_regex", "1."); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_regex", "1."); const std::vector expected{ {__FILE__, "a1ns", 1, {}}, @@ -207,8 +207,8 @@ TEST_F(BenchmarkingStateTest, PerfBasic) { } { - gflags::FlagSaver _; - gflags::SetCommandLineOption( + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption( "bm_perf_args", "stat -e cache-misses,cache-references"); setUpPerfCalled = 0; @@ -234,8 +234,8 @@ TEST_F(BenchmarkingStateTest, PerfSkipsAnIteration) { return PerfScoped{}; }; - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_perf_args", "stat"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_perf_args", "stat"); (void)state.runBenchmarksWithResults(); EXPECT_TRUE(perfIsCalled); @@ -259,10 +259,10 @@ TEST_F(BenchmarkingStateTest, PerfIntegration) { return PerfScoped(args, &perfOuptut); }; - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_perf_args", "stat"); - gflags::SetCommandLineOption("bm_profile", "true"); - gflags::SetCommandLineOption("bm_profile_iters", "1000000"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_perf_args", "stat"); + folly::gflags::SetCommandLineOption("bm_profile", "true"); + folly::gflags::SetCommandLineOption("bm_profile_iters", "1000000"); (void)state.runBenchmarksWithResults(); ASSERT_THAT( @@ -280,9 +280,9 @@ TEST_F(BenchmarkingStateTest, SkipWarmUp) { return iters; }); - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_profile", "true"); - gflags::SetCommandLineOption("bm_profile_iters", "1000"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_profile", "true"); + folly::gflags::SetCommandLineOption("bm_profile_iters", "1000"); // Testing that warm up iteration is off by default and that // we get exactly the number of iterations passed in once. @@ -295,7 +295,7 @@ TEST_F(BenchmarkingStateTest, SkipWarmUp) { iterNumPassed.clear(); - gflags::SetCommandLineOption("bm_warm_up_iteration", "true"); + folly::gflags::SetCommandLineOption("bm_warm_up_iteration", "true"); { (void)state.runBenchmarksWithResults(); @@ -308,8 +308,8 @@ TEST_F(BenchmarkingStateTest, ListTests) { // --bm_list enabled with no benchmarks { - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_list", "true"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_list", "true"); ::testing::internal::CaptureStdout(); runBenchmarks(); output = ::testing::internal::GetCapturedStdout(); @@ -329,8 +329,8 @@ TEST_F(BenchmarkingStateTest, ListTests) { // --bm_list enabled with multiple benchmarks { - gflags::FlagSaver _; - gflags::SetCommandLineOption("bm_list", "true"); + folly::gflags::FlagSaver _; + folly::gflags::SetCommandLineOption("bm_list", "true"); ::testing::internal::CaptureStdout(); runBenchmarks(); output = ::testing::internal::GetCapturedStdout(); diff --git a/folly/test/CancellationTokenBench.cpp b/folly/test/CancellationTokenBench.cpp index b177d2cb43f..cdaab4bed1b 100644 --- a/folly/test/CancellationTokenBench.cpp +++ b/folly/test/CancellationTokenBench.cpp @@ -213,7 +213,7 @@ BENCHMARK(merge15DistinctLVals, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/ConcurrentBitSetTest.cpp b/folly/test/ConcurrentBitSetTest.cpp index 96cc0869412..92422b8a9fb 100644 --- a/folly/test/ConcurrentBitSetTest.cpp +++ b/folly/test/ConcurrentBitSetTest.cpp @@ -70,6 +70,6 @@ TEST(ConcurrentBitSet, Simple) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ConcurrentSkipListBenchmark.cpp b/folly/test/ConcurrentSkipListBenchmark.cpp index 313270502de..58bc1e27d0e 100644 --- a/folly/test/ConcurrentSkipListBenchmark.cpp +++ b/folly/test/ConcurrentSkipListBenchmark.cpp @@ -605,7 +605,7 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); initData(); runBenchmarks(); diff --git a/folly/test/ConcurrentSkipListTest.cpp b/folly/test/ConcurrentSkipListTest.cpp index 00c4c9bd64d..cfff331bafd 100644 --- a/folly/test/ConcurrentSkipListTest.cpp +++ b/folly/test/ConcurrentSkipListTest.cpp @@ -503,7 +503,7 @@ TEST(ConcurrentSkipList, NonTrivialDeallocationWithSysArena) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); google::InitGoogleLogging(argv[0]); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ConstexprMathBenchmark.cpp b/folly/test/ConstexprMathBenchmark.cpp index 3846dc41183..9811b619280 100644 --- a/folly/test/ConstexprMathBenchmark.cpp +++ b/folly/test/ConstexprMathBenchmark.cpp @@ -193,7 +193,7 @@ BENCHMARK_DRAW_LINE(); GENERATE_BENCHMARKS_FOR_TYPE(uint64_t) int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/ConvBenchmark.cpp b/folly/test/ConvBenchmark.cpp index 9e02bbda14c..3ceea15d557 100644 --- a/folly/test/ConvBenchmark.cpp +++ b/folly/test/ConvBenchmark.cpp @@ -1124,7 +1124,7 @@ FLOAT_TO_ARITH_BENCHMARK(int, Int, double2IntGood, double2IntBad) #undef FLOAT_TO_ARITH_BENCHMARK int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/DeterministicScheduleTest.cpp b/folly/test/DeterministicScheduleTest.cpp index f06cc930bb3..f0af6337758 100644 --- a/folly/test/DeterministicScheduleTest.cpp +++ b/folly/test/DeterministicScheduleTest.cpp @@ -408,6 +408,6 @@ TEST(DeterministicSchedule, threadTimestamps) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ExceptionWrapperBenchmark.cpp b/folly/test/ExceptionWrapperBenchmark.cpp index 8287c4aa5dd..4d05e80cf73 100644 --- a/folly/test/ExceptionWrapperBenchmark.cpp +++ b/folly/test/ExceptionWrapperBenchmark.cpp @@ -263,7 +263,7 @@ BENCHMARK_RELATIVE(exception_wrapper_create_and_cast_concurrent, iters) { } int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/FBStringBenchmark.cpp b/folly/test/FBStringBenchmark.cpp index bcf54c6d4f0..fdc79cbdd22 100644 --- a/folly/test/FBStringBenchmark.cpp +++ b/folly/test/FBStringBenchmark.cpp @@ -86,7 +86,7 @@ std::list RandomList(unsigned int maxSize) { #undef STRING int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/FileTestLockHelper.cpp b/folly/test/FileTestLockHelper.cpp index 00001784a14..9d82d5f1b98 100644 --- a/folly/test/FileTestLockHelper.cpp +++ b/folly/test/FileTestLockHelper.cpp @@ -23,7 +23,7 @@ DEFINE_bool(s, false, "get shared lock"); DEFINE_bool(x, false, "get exclusive lock"); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); CHECK_EQ(FLAGS_s + FLAGS_x, 1) << "exactly one of -s and -x must be specified"; diff --git a/folly/test/FingerprintBenchmark.cpp b/folly/test/FingerprintBenchmark.cpp index 4f51de9b7c2..581135141d5 100644 --- a/folly/test/FingerprintBenchmark.cpp +++ b/folly/test/FingerprintBenchmark.cpp @@ -128,7 +128,7 @@ void fastFingerprintTerms128(int num_iterations, int num_ids) { // the benchmark without providing any useful data. int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); #define BM(name, min, max) \ for (size_t i = min; i <= max; i *= 2) { \ addBenchmark( \ diff --git a/folly/test/FingerprintTest.cpp b/folly/test/FingerprintTest.cpp index ee48dbd8f34..bc073f11b36 100644 --- a/folly/test/FingerprintTest.cpp +++ b/folly/test/FingerprintTest.cpp @@ -177,7 +177,7 @@ TEST(Fingerprint, Alignment) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret) { folly::runBenchmarksOnFlag(); diff --git a/folly/test/FormatOtherTest.cpp b/folly/test/FormatOtherTest.cpp index 2bafeaf3584..5775820fe90 100644 --- a/folly/test/FormatOtherTest.cpp +++ b/folly/test/FormatOtherTest.cpp @@ -82,6 +82,6 @@ TEST(FormatOther, smallVector) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/FunctionRefBenchmark.cpp b/folly/test/FunctionRefBenchmark.cpp index d8de7e2d9f4..83ba1f6c1b6 100644 --- a/folly/test/FunctionRefBenchmark.cpp +++ b/folly/test/FunctionRefBenchmark.cpp @@ -234,6 +234,6 @@ BENCHMARK(BigFunctionFollyInlineFunctionRefCreateInvoke, iters) { } // namespace folly int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/test/GLogBenchmark.cpp b/folly/test/GLogBenchmark.cpp index 07531e5bf72..15d5f569c83 100644 --- a/folly/test/GLogBenchmark.cpp +++ b/folly/test/GLogBenchmark.cpp @@ -48,7 +48,7 @@ BENCHMARK(dev_null_log_overhead, iter) { // ============================================================================ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/IPAddressBenchmark.cpp b/folly/test/IPAddressBenchmark.cpp index c91e71e26d1..d5023c3c6a4 100644 --- a/folly/test/IPAddressBenchmark.cpp +++ b/folly/test/IPAddressBenchmark.cpp @@ -187,7 +187,7 @@ BENCHMARK_RELATIVE(ipv6_try_from_string_invalid, iters) { // ============================================================================ int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); return 0; } diff --git a/folly/test/MPMCPipelineTest.cpp b/folly/test/MPMCPipelineTest.cpp index ddae1c0ae39..1db95622134 100644 --- a/folly/test/MPMCPipelineTest.cpp +++ b/folly/test/MPMCPipelineTest.cpp @@ -161,6 +161,6 @@ TEST(MPMCPipeline, MultiThreaded) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/MathBenchmark.cpp b/folly/test/MathBenchmark.cpp index 57a6a150df7..f9ce2f16a91 100644 --- a/folly/test/MathBenchmark.cpp +++ b/folly/test/MathBenchmark.cpp @@ -348,7 +348,7 @@ BENCHMARK(divRoundAwayUint64, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/MemcpyBenchmark.cpp b/folly/test/MemcpyBenchmark.cpp index dd03945be42..c759945d002 100644 --- a/folly/test/MemcpyBenchmark.cpp +++ b/folly/test/MemcpyBenchmark.cpp @@ -243,7 +243,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM( // ============================================================================ int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/MemoryIdlerBenchmark.cpp b/folly/test/MemoryIdlerBenchmark.cpp index 20bb155a4f4..81270eaeb49 100644 --- a/folly/test/MemoryIdlerBenchmark.cpp +++ b/folly/test/MemoryIdlerBenchmark.cpp @@ -33,7 +33,7 @@ BENCHMARK(releaseMallocTLS, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/MemsetBenchmark.cpp b/folly/test/MemsetBenchmark.cpp index 139987d0ddf..fd549278f50 100644 --- a/folly/test/MemsetBenchmark.cpp +++ b/folly/test/MemsetBenchmark.cpp @@ -78,7 +78,7 @@ void addMemsetBenchmark(const std::string& name) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); assert(FLAGS_min_size <= FLAGS_max_size); diff --git a/folly/test/ProducerConsumerQueueBenchmark.cpp b/folly/test/ProducerConsumerQueueBenchmark.cpp index 75efdb92ce1..98b4f76e7bc 100644 --- a/folly/test/ProducerConsumerQueueBenchmark.cpp +++ b/folly/test/ProducerConsumerQueueBenchmark.cpp @@ -233,7 +233,7 @@ BENCHMARK_PARAM(BM_ProducerConsumerLatency, 1048574) int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); return 0; diff --git a/folly/test/RandomBenchmark.cpp b/folly/test/RandomBenchmark.cpp index e5bd0af6fa6..2b650b097ce 100644 --- a/folly/test/RandomBenchmark.cpp +++ b/folly/test/RandomBenchmark.cpp @@ -100,7 +100,7 @@ BENCHMARK(Random64OneIn) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/RangeFindBenchmark.cpp b/folly/test/RangeFindBenchmark.cpp index a529c5a5e5b..a0fb3152f0c 100644 --- a/folly/test/RangeFindBenchmark.cpp +++ b/folly/test/RangeFindBenchmark.cpp @@ -399,7 +399,7 @@ BENCHMARK(FindFirstOfOffsetRange, n) { BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); for (int len : {1, 8, 10, 16, 32, 64, 128, 256, 10 * 1024, 1024 * 1024}) { initStr(len); diff --git a/folly/test/SharedMutexTest.cpp b/folly/test/SharedMutexTest.cpp index 532ea757df3..1e172c186cb 100644 --- a/folly/test/SharedMutexTest.cpp +++ b/folly/test/SharedMutexTest.cpp @@ -2446,7 +2446,7 @@ int main(int argc, char** argv) { (void)timed_rd_pri_ping_pong; testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); int rv = RUN_ALL_TESTS(); folly::runBenchmarksOnFlag(); return rv; diff --git a/folly/test/SingletonBenchmark.cpp b/folly/test/SingletonBenchmark.cpp index 8119f33cdf1..0bc451f903e 100644 --- a/folly/test/SingletonBenchmark.cpp +++ b/folly/test/SingletonBenchmark.cpp @@ -169,9 +169,9 @@ BENCHMARK(FollyLeakySingleton4Threads, n) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_min_usec", "100000", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_usec", "100000", folly::gflags::SET_FLAG_IF_DEFAULT); folly::SingletonVault::singleton()->registrationComplete(); folly::runBenchmarks(); diff --git a/folly/test/StringBenchmark.cpp b/folly/test/StringBenchmark.cpp index 389771c3931..6830f243abf 100644 --- a/folly/test/StringBenchmark.cpp +++ b/folly/test/StringBenchmark.cpp @@ -346,7 +346,7 @@ BENCHMARK(joinInt, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); initBenchmark(); folly::runBenchmarks(); return 0; diff --git a/folly/test/StringToFloatBenchmark.cpp b/folly/test/StringToFloatBenchmark.cpp index 72ad45ef4c3..b2b4055fdbe 100644 --- a/folly/test/StringToFloatBenchmark.cpp +++ b/folly/test/StringToFloatBenchmark.cpp @@ -330,7 +330,7 @@ BENCHMARK(four_digit_percentages_FAST_FLOAT, n) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); std::cout << "Generating input..."; folly::stop_watch stopwatch; diff --git a/folly/test/SubprocessBench.cpp b/folly/test/SubprocessBench.cpp index 09a092ae836..92795339b0d 100644 --- a/folly/test/SubprocessBench.cpp +++ b/folly/test/SubprocessBench.cpp @@ -40,7 +40,7 @@ BENCHMARK(spawn_without_close_fds, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); // Create 512 descriptors int rootfd = fileops::open("/", O_RDONLY); diff --git a/folly/test/SubprocessTestParentDeathHelper.cpp b/folly/test/SubprocessTestParentDeathHelper.cpp index 6b6ea4aaf71..ce6bc58ee88 100644 --- a/folly/test/SubprocessTestParentDeathHelper.cpp +++ b/folly/test/SubprocessTestParentDeathHelper.cpp @@ -70,7 +70,7 @@ void runChild(const char* file) { } int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); CHECK_EQ(argc, 2); if (FLAGS_child) { runChild(argv[1]); diff --git a/folly/test/SynchronizedBenchmark.cpp b/folly/test/SynchronizedBenchmark.cpp index ba3fe34dc01..7e8636868e3 100644 --- a/folly/test/SynchronizedBenchmark.cpp +++ b/folly/test/SynchronizedBenchmark.cpp @@ -490,7 +490,7 @@ BENCHMARK(SixteenThreadsSixteenMutexesPersistent, iters) { } int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/test/ThreadCachedIntTest.cpp b/folly/test/ThreadCachedIntTest.cpp index 2cacabbf535..181654254e0 100644 --- a/folly/test/ThreadCachedIntTest.cpp +++ b/folly/test/ThreadCachedIntTest.cpp @@ -385,9 +385,9 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_min_usec", "10000", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_min_usec", "10000", folly::gflags::SET_FLAG_IF_DEFAULT); if (FLAGS_benchmark) { folly::runBenchmarks(); } diff --git a/folly/test/ThreadLocalAccessBenchmark.cpp b/folly/test/ThreadLocalAccessBenchmark.cpp index 08ce3695b41..6409a57b925 100644 --- a/folly/test/ThreadLocalAccessBenchmark.cpp +++ b/folly/test/ThreadLocalAccessBenchmark.cpp @@ -120,7 +120,7 @@ BENCHMARK_PARAM(runTest, 2048) BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/test/ThreadLocalBenchmark.cpp b/folly/test/ThreadLocalBenchmark.cpp index ad99f46ddb5..fb68f5fcaee 100644 --- a/folly/test/ThreadLocalBenchmark.cpp +++ b/folly/test/ThreadLocalBenchmark.cpp @@ -163,9 +163,9 @@ BENCHMARK(BM_tlp_access_all_threads_iterate, iters) { BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); - gflags::SetCommandLineOptionWithMode( - "bm_max_iters", "100000000", gflags::SET_FLAG_IF_DEFAULT); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::SetCommandLineOptionWithMode( + "bm_max_iters", "100000000", folly::gflags::SET_FLAG_IF_DEFAULT); folly::runBenchmarks(); return 0; } diff --git a/folly/test/ThreadLocalDestroyBenchmark.cpp b/folly/test/ThreadLocalDestroyBenchmark.cpp index 19c61b9f2e8..19fd3a2d358 100644 --- a/folly/test/ThreadLocalDestroyBenchmark.cpp +++ b/folly/test/ThreadLocalDestroyBenchmark.cpp @@ -118,7 +118,7 @@ BENCHMARK_PARAM(runTestDiffTag, 2048) BENCHMARK_DRAW_LINE(); int main(int argc, char* argv[]) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/folly/test/VarintTest.cpp b/folly/test/VarintTest.cpp index 7a7096b5ffb..afce902d6b6 100644 --- a/folly/test/VarintTest.cpp +++ b/folly/test/VarintTest.cpp @@ -202,7 +202,7 @@ BENCHMARK(VarintDecoding, iters) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); int ret = RUN_ALL_TESTS(); if (ret == 0) { diff --git a/folly/test/function_benchmark/main.cpp b/folly/test/function_benchmark/main.cpp index a06f82e6794..94cf6f43297 100644 --- a/folly/test/function_benchmark/main.cpp +++ b/folly/test/function_benchmark/main.cpp @@ -408,7 +408,7 @@ BENCHMARK(Function_move_large, iters) { // main() int main(int argc, char** argv) { - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/test/stl_tests/StlVectorTest.cpp b/folly/test/stl_tests/StlVectorTest.cpp index 61d1e55f7ce..cbdcc7bf812 100644 --- a/folly/test/stl_tests/StlVectorTest.cpp +++ b/folly/test/stl_tests/StlVectorTest.cpp @@ -3050,7 +3050,7 @@ STL_TEST("attach", attach, is_destructible, a) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); + folly::gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); }