| 239 | } |
| 240 | |
| 241 | void 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 | |
| 255 | struct ProfilerImpl { |
| 256 | boost::asio::io_context context; |
no test coverage detected