|
proxygen
|
#include <folly/concurrency/CacheLocality.h>#include <folly/portability/GTest.h>#include <glog/logging.h>#include <memory>#include <thread>#include <unordered_map>Go to the source code of this file.
Functions | |
| TEST (CacheLocality, FakeSysfs) | |
| TEST (ThreadId, SimplePthread) | |
| TEST (AccessSpreader, Simple) | |
| TEST (AccessSpreader, SimpleCached) | |
| TEST (AccessSpreader, ConcurrentAccessCached) | |
Variables | |
| static std::unordered_map< std::string, std::string > | fakeSysfsTree |
| static const CacheLocality | nonUniformExampleLocality |
| This is the expected CacheLocality structure for fakeSysfsTree. More... | |
| TEST | ( | CacheLocality | , |
| FakeSysfs | |||
| ) |
Definition at line 312 of file CacheLocalityTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, name, nonUniformExampleLocality, folly::Getcpu::resolveVdsoFunc(), string, and folly::TEST().
| TEST | ( | ThreadId | , |
| SimplePthread | |||
| ) |
Definition at line 347 of file CacheLocalityTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and folly::FallbackGetcpu< ThreadId >::getcpu().
| TEST | ( | AccessSpreader | , |
| Simple | |||
| ) |
Definition at line 372 of file CacheLocalityTest.cpp.
| TEST | ( | AccessSpreader | , |
| SimpleCached | |||
| ) |
Definition at line 378 of file CacheLocalityTest.cpp.
| TEST | ( | AccessSpreader | , |
| ConcurrentAccessCached | |||
| ) |
Definition at line 384 of file CacheLocalityTest.cpp.
References a, c, folly::AccessSpreader< Atom >::current(), DECLARE_SPREADER_TAG, EXPECT_EQ, EXPECT_LT, EXPECT_TRUE, folly::CoreRawAllocator< Stripes >::get(), i, s, folly::TEST(), threads, folly::CacheLocality::uniform(), and folly::fibers::yield().
|
static |
This is the relevant nodes from a production box's sysfs tree. If you think this map is ugly you should see the version of this test that used a real directory tree. To reduce the chance of testing error I haven't tried to remove the common prefix
Definition at line 32 of file CacheLocalityTest.cpp.
|
static |
This is the expected CacheLocality structure for fakeSysfsTree.
Definition at line 306 of file CacheLocalityTest.cpp.
Referenced by TEST().