TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Counter Struct Reference
Collaboration diagram for Counter:
[legend]

Public Types

using clock = std::chrono::high_resolution_clock
using time_point = std::chrono::time_point<clock>
using duration = std::chrono::duration<double>

Public Member Functions

time_point now ()
 Counter (int counter_level, std::string counter_name, std::string counter_family="None", bool is_comm=false, bool is_gpu=false)
void begin_count_ (int counter_level, time_point t)
void end_count_ (int count_increment, long int quantity_increment, time_point t_stop)
void set_parent (Counter *parent_counter)
double get_time_ () const
bool running_ () const
std::array< std::array< double, 4 >, 4 > compute_min_max_avg_sd_ () const
 update variables : avg_time_per_step_ , min_time_per_step_ , max_time_per_step_ , sd_time_per_step_
void reset ()

Public Attributes

const std::string description_
int level_
const std::string family_
const bool is_comm_
const bool is_gpu_
int count_
long int quantity_
Counterparent_
duration total_time_
duration time_alone_
duration time_ts_
time_point open_time_ts_
time_point last_open_time_
time_point last_open_time_alone_
double avg_time_per_step_
double min_time_per_step_
double max_time_per_step_
double var_time_per_step_
bool is_running_

Detailed Description

Definition at line 90 of file Perf_counters.cpp.

Member Typedef Documentation

◆ clock

using Counter::clock = std::chrono::high_resolution_clock

Definition at line 93 of file Perf_counters.cpp.

◆ duration

using Counter::duration = std::chrono::duration<double>

Definition at line 95 of file Perf_counters.cpp.

◆ time_point

using Counter::time_point = std::chrono::time_point<clock>

Definition at line 94 of file Perf_counters.cpp.

Constructor & Destructor Documentation

◆ Counter()

Counter::Counter ( int counter_level,
std::string counter_name,
std::string counter_family = "None",
bool is_comm = false,
bool is_gpu = false )

Definition at line 143 of file Perf_counters.cpp.

Member Function Documentation

◆ begin_count_()

void Counter::begin_count_ ( int counter_level,
time_point t )

< You have changed the level of your counter

Definition at line 160 of file Perf_counters.cpp.

◆ compute_min_max_avg_sd_()

std::array< std::array< double, 4 >, 4 > Counter::compute_min_max_avg_sd_ ( ) const

update variables : avg_time_per_step_ , min_time_per_step_ , max_time_per_step_ , sd_time_per_step_

Definition at line 211 of file Perf_counters.cpp.

◆ end_count_()

void Counter::end_count_ ( int count_increment,
long int quantity_increment,
time_point t_stop )

Definition at line 184 of file Perf_counters.cpp.

◆ get_time_()

double Counter::get_time_ ( ) const
inline

Definition at line 109 of file Perf_counters.cpp.

◆ now()

time_point Counter::now ( )
inline

Definition at line 96 of file Perf_counters.cpp.

◆ reset()

void Counter::reset ( )

Definition at line 239 of file Perf_counters.cpp.

◆ running_()

bool Counter::running_ ( ) const
inline

Definition at line 111 of file Perf_counters.cpp.

◆ set_parent()

void Counter::set_parent ( Counter * parent_counter)
inline

Definition at line 107 of file Perf_counters.cpp.

Member Data Documentation

◆ avg_time_per_step_

double Counter::avg_time_per_step_

Definition at line 135 of file Perf_counters.cpp.

◆ count_

int Counter::count_

Definition at line 126 of file Perf_counters.cpp.

◆ description_

const std::string Counter::description_

Definition at line 121 of file Perf_counters.cpp.

◆ family_

const std::string Counter::family_

Definition at line 123 of file Perf_counters.cpp.

◆ is_comm_

const bool Counter::is_comm_

Definition at line 124 of file Perf_counters.cpp.

◆ is_gpu_

const bool Counter::is_gpu_

Definition at line 125 of file Perf_counters.cpp.

◆ is_running_

bool Counter::is_running_

Definition at line 139 of file Perf_counters.cpp.

◆ last_open_time_

time_point Counter::last_open_time_

Definition at line 133 of file Perf_counters.cpp.

◆ last_open_time_alone_

time_point Counter::last_open_time_alone_

Definition at line 134 of file Perf_counters.cpp.

◆ level_

int Counter::level_

Definition at line 122 of file Perf_counters.cpp.

◆ max_time_per_step_

double Counter::max_time_per_step_

Definition at line 137 of file Perf_counters.cpp.

◆ min_time_per_step_

double Counter::min_time_per_step_

Definition at line 136 of file Perf_counters.cpp.

◆ open_time_ts_

time_point Counter::open_time_ts_

Definition at line 132 of file Perf_counters.cpp.

◆ parent_

Counter* Counter::parent_

Definition at line 128 of file Perf_counters.cpp.

◆ quantity_

long int Counter::quantity_

Definition at line 127 of file Perf_counters.cpp.

◆ time_alone_

duration Counter::time_alone_

Definition at line 130 of file Perf_counters.cpp.

◆ time_ts_

duration Counter::time_ts_

Definition at line 131 of file Perf_counters.cpp.

◆ total_time_

duration Counter::total_time_

Definition at line 129 of file Perf_counters.cpp.

◆ var_time_per_step_

double Counter::var_time_per_step_

Definition at line 138 of file Perf_counters.cpp.


The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/master/src/Kernel/Utilitaires/Perf_counters.cpp