BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_UTIL_TIMING_AGGREGATOR_H_
16 #define CORE_UTIL_TIMING_AGGREGATOR_H_
35 void AddEntry(
const std::string& key, int64_t value) {
37 std::vector<int64_t> data;
38 data.push_back(value);
55 std::map<std::string, std::vector<int64_t>>
timings_;
66 os <<
"\033[1mTotal execution time per operation\033[0m" << std::endl;
68 os << timing.first <<
": "
69 << std::accumulate(timing.second.begin(), timing.second.end(), 0)
73 os <<
"No statistics were gathered!" << std::endl;
79 #endif // CORE_UTIL_TIMING_AGGREGATOR_H_
std::vector< std::string > descriptions_
~TimingAggregator()=default
std::map< std::string, std::vector< int64_t > > timings_
int operator[](std::string idx)
void AddEntry(const std::string &key, int64_t value)
friend std::ostream & operator<<(std::ostream &os, const TimingAggregator &p)
std::ostream & operator<<(std::ostream &o, const MathArray< T, N > &arr)
TimingAggregator()=default
void AddDescription(const std::string &text)
BDM_CLASS_DEF_NV(TimingAggregator, 1)