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

this struct measures the resident set size (RSS) currently allocated in pages of memory. Unlike the peak_rss, this value will fluctuate as memory gets freed and allocated More...

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

+ Collaboration diagram for tim::component::page_rss:

Public Types

using value_type = int64_t
 
using result_type = double
 
using this_type = page_rss
 
using base_type = base< this_type, value_type >
 
using storage_type = empty_storage
 

Public Member Functions

double get () const
 
double get_display () const
 
void start ()
 
void stop ()
 
void sample ()
 

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

this struct measures the resident set size (RSS) currently allocated in pages of memory. Unlike the peak_rss, this value will fluctuate as memory gets freed and allocated

Definition at line 105 of file components.hpp.

Member Typedef Documentation

◆ base_type

◆ result_type

Definition at line 108 of file components.hpp.

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ this_type

Definition at line 109 of file components.hpp.

◆ value_type

Definition at line 107 of file components.hpp.

Member Function Documentation

◆ description()

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

Definition at line 113 of file components.hpp.

114 {
115 return "Amount of memory allocated in pages of memory. Unlike peak_rss, value "
116 "will fluctuate as memory is freed/allocated";
117 }

◆ get()

double tim::component::page_rss::get ( ) const
inline

Definition at line 119 of file components.hpp.

120 {
121 auto val = base_type::load();
122 return val / static_cast<double>(base_type::get_unit());
123 }
decltype(auto) load()
static int64_t get_unit()

References tim::component::base< Tp, Value >::get_unit(), and tim::component::base< Tp, Value >::load().

Referenced by get_display().

◆ get_display()

double tim::component::page_rss::get_display ( ) const
inline

Definition at line 124 of file components.hpp.

124{ return get(); }

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

Definition at line 112 of file components.hpp.

112{ return "page_rss"; }

◆ record()

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

Definition at line 118 of file components.hpp.

118{ return get_page_rss(); }

Referenced by sample(), start(), and stop().

◆ sample()

void tim::component::page_rss::sample ( )
inline

Definition at line 131 of file components.hpp.

131{ accum = value = std::max<int64_t>(value, record()); }
static value_type record()
Definition: components.hpp:118

References record().

◆ start()

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

Definition at line 125 of file components.hpp.

125{ value = record(); }

References record().

◆ stop()

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

Definition at line 126 of file components.hpp.

127 {
128 value = (record() - value);
129 accum += value;
130 }

References record().


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