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::wall_clock Struct Reference

#include "timemory/components/timing/wall_clock.hpp"

+ Collaboration diagram for tim::component::wall_clock:

Public Types

using ratio_t = std::nano
 
using value_type = int64_t
 
using base_type = base< wall_clock, value_type >
 
using storage_type = empty_storage
 

Public Member Functions

double get () const noexcept
 
auto get_display () const noexcept
 
void start () noexcept
 
void stop () noexcept
 

Static Public Member Functions

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

Detailed Description

Definition at line 44 of file wall_clock.hpp.

Member Typedef Documentation

◆ base_type

◆ ratio_t

Definition at line 46 of file wall_clock.hpp.

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ value_type

Definition at line 47 of file wall_clock.hpp.

Member Function Documentation

◆ description()

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

Definition at line 51 of file wall_clock.hpp.

52 {
53 return "Real-clock timer (i.e. wall-clock timer)";
54 }

◆ get()

double tim::component::wall_clock::get ( ) const
inlinenoexcept

◆ get_display()

auto tim::component::wall_clock::get_display ( ) const
inlinenoexcept

Definition at line 64 of file wall_clock.hpp.

64{ return get(); }
double get() const noexcept
Definition: wall_clock.hpp:60

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::wall_clock::label ( )
inlinestatic

Definition at line 50 of file wall_clock.hpp.

50{ return "wall"; }

◆ record()

static value_type tim::component::wall_clock::record ( )
inlinestaticnoexcept

Definition at line 55 of file wall_clock.hpp.

56 {
57 return tim::get_clock_real_now<int64_t, ratio_t>();
58 }

Referenced by tim::component::cpu_util::record(), tim::component::process_cpu_util::record(), tim::component::thread_cpu_util::record(), start(), and stop().

◆ start()

void tim::component::wall_clock::start ( )
inlinenoexcept

Definition at line 66 of file wall_clock.hpp.

66{ value = record(); }
static value_type record() noexcept
Definition: wall_clock.hpp:55

References record().

◆ stop()

void tim::component::wall_clock::stop ( )
inlinenoexcept

Definition at line 67 of file wall_clock.hpp.

67{ accum += (value = (record() - value)); }

References record().


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