diff options
author | Robert Guo <robert.guo@10gen.com> | 2018-03-13 14:58:04 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2018-03-15 10:14:34 -0400 |
commit | ebcfc62197744ffe0bb77a404a8e210c2100de31 (patch) | |
tree | 0f9ce5d4a564abb207045d0765a7b77281de0cad /src/mongo/unittest/system_resource_canary_bm.cpp | |
parent | 137bae8a3739545564cef631e33680108e767330 (diff) | |
download | mongo-ebcfc62197744ffe0bb77a404a8e210c2100de31.tar.gz |
SERVER-33643 refactor processInfo to no longer depend on global
initialization.
Diffstat (limited to 'src/mongo/unittest/system_resource_canary_bm.cpp')
-rw-r--r-- | src/mongo/unittest/system_resource_canary_bm.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/unittest/system_resource_canary_bm.cpp b/src/mongo/unittest/system_resource_canary_bm.cpp index 7d15a8263d4..e7953fc08ff 100644 --- a/src/mongo/unittest/system_resource_canary_bm.cpp +++ b/src/mongo/unittest/system_resource_canary_bm.cpp @@ -154,11 +154,7 @@ BENCHMARK_REGISTER_F(CacheLatencyTest, BM_CacheLatency) ->RangeMultiplier(2 * 1024) // Loop over arrays of different sizes to test the L2, L3, and RAM latency. ->Range(256 * 1024, 4096 * 1024) - ->ThreadRange(1, [] { - ProcessInfo::initializeSystemInfo(); - ProcessInfo pi; - return static_cast<int>(pi.getNumAvailableCores().value_or(pi.getNumCores())); - }()); + ->ThreadRange(1, ProcessInfo::getNumAvailableCores()); } // namespace } // namespace mongo |