MCPcopy Create free account
hub / github.com/facebook/CacheLib / injectPauseSet

Function injectPauseSet

cachelib/common/inject_pause.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120} // namespace detail
121
122void injectPauseSet(folly::StringPiece name, size_t numThreads) {
123 if (!injectPauseEnabled()) {
124 return;
125 }
126 auto ptr = pausePoints().lock();
127 if (injectPauseLogEnabled()) {
128 XLOGF(ERR, "[{}] injectPauseSet threads {}", name, numThreads);
129 }
130 auto res = ptr->emplace(
131 std::piecewise_construct, std::make_tuple(name.str()), std::make_tuple());
132 res.first->second.limit = numThreads;
133 res.first->second.enabled = true;
134}
135
136void injectPauseSet(folly::StringPiece name, PauseCallback&& callback) {
137 if (!injectPauseEnabled()) {

Callers 3

TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 2

strMethod · 0.80
lockMethod · 0.45

Tested by 3

TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68