MCPcopy Create free account
hub / github.com/apple/foundationdb / sample

Function sample

fdbclient/ActorLineageProfiler.cpp:241–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void sample(LineageReference* lineagePtr) {
242 if (!lineagePtr->isValid()) {
243 return;
244 }
245 if (!lineagePtr->isAllocated()) {
246 lineagePtr->allocate();
247 }
248 (*lineagePtr)->modify(&NameLineage::actorName) = lineagePtr->actorName();
249 boost::asio::post(ActorLineageProfiler::instance().context(),
250 [lineage = LineageReference::addRef(lineagePtr->getPtr())]() {
251 SampleCollection::instance().collect(lineage);
252 });
253}
254
255struct ProfilerImpl {
256 boost::asio::io_context context;

Callers 4

replaceLineageFunction · 0.85
sampleSecondsMethod · 0.85
actionMethod · 0.85
actionMethod · 0.85

Calls 7

isAllocatedMethod · 0.80
modifyMethod · 0.80
actorNameMethod · 0.80
isValidMethod · 0.45
allocateMethod · 0.45
getPtrMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected