timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::sampling Namespace Reference

Classes

struct  fixed_sig
 
struct  fixed_sig<>
 
struct  fixed_size
 
struct  fixed_size< dynamic >
 
struct  sampler
 The design of the sampler struct is similar to the tim::component::gotcha component: the first template parameter is a specification of a bundle of components which the struct internally takes measurements with and the second template parameter is a size specification. The size specification is to help ensure that the allocation does not grow too significantly, however, by specifying the size as either 0 (zero) or tim::sampling::dynamic, a std::vector is used instead of the fixed-sized std::array. More...
 
struct  sampler< CompT< Types... >, N, SigIds... >
 

Typedefs

template<size_t N>
using fixed_size_t = typename fixed_size< N >::type
 
template<int... Ids>
using fixed_sig_t = typename fixed_sig< Ids... >::type
 

Enumerations

enum  { dynamic = 0 }
 \value tim::sampling::dynamic More...
 

Class Documentation

◆ tim::sampling::sampler

struct tim::sampling::sampler
template<typename CompT, size_t N, int... SigIds>
struct tim::sampling::sampler< CompT, N, SigIds >

The design of the sampler struct is similar to the tim::component::gotcha component: the first template parameter is a specification of a bundle of components which the struct internally takes measurements with and the second template parameter is a size specification. The size specification is to help ensure that the allocation does not grow too significantly, however, by specifying the size as either 0 (zero) or tim::sampling::dynamic, a std::vector is used instead of the fixed-sized std::array.

// sampling components
// create at least one instance before configuring
bundle_t sampling_bundle("example");
sample_t::configure({ SIGALRM }); // configure the sampling
sample_t::pause(); // wait for one signal to be delivered
sampling_bundle.start(); // start sampling and wall-clock
...
sampling_bundle.stop(); // stop sampling and wall-clock
sample_t::pause(); // wait for one signal to be delivered
sampler_t::ignore({ SIGALRM }); // ignore future interrupts
sampler_t::wait(process::target_pid()); // wait for pid to finish
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
The design of the sampler struct is similar to the tim::component::gotcha component: the first templa...
Definition: sampler.hpp:74

Definition at line 74 of file sampler.hpp.

+ Collaboration diagram for tim::sampling::sampler< CompT, N, SigIds >:

Typedef Documentation

◆ fixed_sig_t

template<int... Ids>
using tim::sampling::fixed_sig_t = typedef typename fixed_sig<Ids...>::type

Definition at line 124 of file sampler.hpp.

◆ fixed_size_t

template<size_t N>
using tim::sampling::fixed_size_t = typedef typename fixed_size<N>::type

Definition at line 111 of file sampler.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

\value tim::sampling::dynamic

A bare enumeration value implicitly convertible to zero.

Enumerator
dynamic 

Definition at line 95 of file sampler.hpp.

96{
97 dynamic = 0
98};