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::component::trip_count Struct Reference

Records the number of invocations. This is the most lightweight metric available since it only increments an integer and never records any statistics. If dynamic instrumentation is used and the overhead is significant, it is recommended to set this as the only component (-d trip_count) and then use the regex exclude option (-E) to remove any non-critical function calls which have very high trip-counts. More...

#include "timemory/components/trip_count/components.hpp"

+ Collaboration diagram for tim::component::trip_count:

Public Types

using value_type = int64_t
 
using this_type = trip_count
 
using base_type = base< this_type, value_type >
 
using storage_type = empty_storage
 

Public Member Functions

value_type get () const
 
value_type get_display () const
 
void start ()
 
void stop ()
 

Static Public Member Functions

static std::string label ()
 
static std::string description ()
 
static value_type record ()
 
template<typename... Args>
static opaque get_opaque (Args &&...)
 

Detailed Description

Records the number of invocations. This is the most lightweight metric available since it only increments an integer and never records any statistics. If dynamic instrumentation is used and the overhead is significant, it is recommended to set this as the only component (-d trip_count) and then use the regex exclude option (-E) to remove any non-critical function calls which have very high trip-counts.

Definition at line 53 of file components.hpp.

Member Typedef Documentation

◆ base_type

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ this_type

◆ value_type

Definition at line 55 of file components.hpp.

Member Function Documentation

◆ description()

static std::string tim::component::trip_count::description ( )
inlinestatic

Definition at line 60 of file components.hpp.

60{ return "Counts number of invocations"; }

◆ get()

value_type tim::component::trip_count::get ( ) const
inline

Definition at line 63 of file components.hpp.

63{ return value; }

Referenced by get_display().

◆ get_display()

value_type tim::component::trip_count::get_display ( ) const
inline

Definition at line 64 of file components.hpp.

64{ return get(); }
value_type get() const
Definition: components.hpp:63

References get().

◆ get_opaque()

template<typename... Args>
static opaque tim::component::empty_base::get_opaque ( Args &&  ...)
inlinestaticinherited

Definition at line 72 of file declaration.hpp.

73 {
74 return opaque{};
75 }

◆ label()

static std::string tim::component::trip_count::label ( )
inlinestatic

Definition at line 59 of file components.hpp.

59{ return "trip_count"; }

◆ record()

static value_type tim::component::trip_count::record ( )
inlinestatic

Definition at line 61 of file components.hpp.

61{ return 1; }

◆ start()

void tim::component::trip_count::start ( )
inline

Definition at line 66 of file components.hpp.

66{ value += 1; }

◆ stop()

void tim::component::trip_count::stop ( )
inline

Definition at line 67 of file components.hpp.

67{}

The documentation for this struct was generated from the following file: