MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / cleanupProcessHistory

Method cleanupProcessHistory

src/processSampler.cpp:52–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void ProcessSampler::cleanupProcessHistory(const int pid_count) {
53 const std::unordered_set<int> active_pid_set(_pids, _pids + pid_count);
54 for (auto it = _process_history.begin(); it != _process_history.end();) {
55 if (active_pid_set.count(it->first) == 0) {
56 it = _process_history.erase(it);
57 } else {
58 ++it;
59 }
60 }
61}
62
63void ProcessSampler::enable(const long sampling_interval) {
64 if (_sampling_interval != sampling_interval) {

Callers

nothing calls this directly

Calls 2

endMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected