Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
art::LinuxProcData Struct Reference

#include <LinuxProcData.h>

Classes

struct  proc_type
 
struct  rss_t
 
struct  vsize_t
 

Public Types

enum  procfs_type { VSIZE, RSS, ntypes }
 
using proc_tuple = std::tuple< vsize_t, rss_t >
 

Static Public Member Functions

static auto make_proc_tuple (vsize_t::value_type const vsize={}, rss_t::value_type const rss={})
 
template<typename T >
static std::enable_if_t< std::is_base_of< proc_type, T >::value, double > getValueInMB (proc_tuple const &t)
 

Static Public Attributes

static constexpr double KB {1000.}
 
static constexpr double KiB {1.024 * KB}
 
static constexpr double MB {KB * KB}
 
static constexpr double MiB {KiB * KiB}
 

Detailed Description

Definition at line 71 of file LinuxProcData.h.

Member Typedef Documentation

Definition at line 90 of file LinuxProcData.h.

Member Enumeration Documentation

Enumerator
VSIZE 
RSS 
ntypes 

Definition at line 74 of file LinuxProcData.h.

Member Function Documentation

template<typename T >
static std::enable_if_t<std::is_base_of<proc_type, T>::value, double> art::LinuxProcData::getValueInMB ( proc_tuple const &  t)
inlinestatic

Definition at line 101 of file LinuxProcData.h.

102  {
103  // Info from proc is in bytes; convert to base-10 MB.
104  return std::get<T>(t).value / MB;
105  }
static constexpr double MB
static auto art::LinuxProcData::make_proc_tuple ( vsize_t::value_type const  vsize = {},
rss_t::value_type const  rss = {} 
)
inlinestatic

Definition at line 93 of file LinuxProcData.h.

93  {},
94  rss_t::value_type const rss = {})
95  {
96  return proc_tuple{vsize_t{vsize}, rss_t{rss}};
97  }
std::tuple< vsize_t, rss_t > proc_tuple
Definition: LinuxProcData.h:90

Member Data Documentation

constexpr double art::LinuxProcData::KB {1000.}
static

Definition at line 108 of file LinuxProcData.h.

constexpr double art::LinuxProcData::KiB {1.024 * KB}
static

Definition at line 109 of file LinuxProcData.h.

constexpr double art::LinuxProcData::MB {KB * KB}
static

Definition at line 110 of file LinuxProcData.h.

constexpr double art::LinuxProcData::MiB {KiB * KiB}
static

Definition at line 111 of file LinuxProcData.h.


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