|
guanaqo
1.0.0-alpha.25
Utilities for scientific software
|
#include <guanaqo/pcm/counters.hpp>
Pins the thread to the current CPU and records a snapshot of performance events.
When stop is called or when the object is destroyed, another snapshot is taken and the counters for the thread are updated. The updated counters are passed to the provided function, which can be used for logging Perfetto counters or for other purposes.
Definition at line 69 of file counters.hpp.
Public Member Functions | |
| ScopedCounters (F &&func) | |
| ScopedCounters (const ScopedCounters &)=delete | |
| ScopedCounters & | operator= (const ScopedCounters &)=delete |
| ~ScopedCounters () | |
| ThreadPerfCounters * | get () |
| void | stop () |
Public Attributes | |
| F | func |
| std::unique_ptr< detail::ScopedCounters > | impl |
|
inline |
Definition at line 73 of file counters.hpp.
|
delete |
|
inline |
|
delete |
|
inline |
Definition at line 78 of file counters.hpp.
|
inline |
| F guanaqo::pcm::ScopedCounters< F >::func |
Definition at line 70 of file counters.hpp.
| std::unique_ptr<detail::ScopedCounters> guanaqo::pcm::ScopedCounters< F >::impl |
Definition at line 71 of file counters.hpp.