MCPcopy Create free account
hub / github.com/bytedance/bolt / testingTriggerSpill

Function testingTriggerSpill

bolt/exec/Spill.cpp:571–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 testingSpillCounter() = maxInjections;
570}
571
572TestScopedSpillInjection::~TestScopedSpillInjection() {
573 testingSpillPct() = 0;
574 testingSpillCounter() = 0;
575}
576
577bool testingTriggerSpill() {
578 // Do not evaluate further if trigger is not set.
579 if (testingSpillCounter() <= 0 || testingSpillPct() <= 0) {
580 return false;
581 }
582 if (folly::Random::rand32() % 100 < testingSpillPct()) {
583 return testingSpillCounter()-- > 0;

Callers 7

ensureInputFitsMethod · 0.85
ensureInputFitsMethod · 0.85
ensureInputFitsMethod · 0.85
ensureOutputFitsMethod · 0.85
ensureInputFitsMethod · 0.85
reserveMemoryMethod · 0.85
ensureInputFitsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected