guanaqo 1.0.0-alpha.24
Utilities for scientific software
Loading...
Searching...
No Matches
counters.hpp File Reference

Detailed Description

Performance counter snapshots and scoped collectors.

Definition in file counters.hpp.

#include <guanaqo/export.h>
#include <cstdint>
#include <memory>
#include <utility>
Include dependency graph for counters.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  guanaqo::pcm::ThreadPerfCounters
struct  guanaqo::pcm::detail::ScopedCounters
struct  guanaqo::pcm::ScopedCounters< F >
 Pins the thread to the current CPU and records a snapshot of performance events. More...

Namespaces

namespace  guanaqo
namespace  guanaqo::pcm
namespace  guanaqo::pcm::detail

Functions

std::unique_ptr< detail::ScopedCountersguanaqo::pcm::start_counters ()
 May return null if PCM is not available.
void guanaqo::pcm::disable_counters ()
 Disables performance counters globally. Blocks until all active counters have stopped.
void guanaqo::pcm::enable_counters ()
 Enables performance counters globally.
template<class F>
 guanaqo::pcm::ScopedCounters (F &&) -> ScopedCounters< F >
template<class F>
 guanaqo::pcm::ScopedCounters (F &) -> ScopedCounters< F & >