11 #include <stk_util/diag/TimerMetricTraits.hpp> 12 #include <stk_util/environment/CPUTime.hpp> 13 #include <stk_util/environment/WallTime.hpp> 14 #include <stk_util/util/MallocUsed.h> 15 #include <stk_util/environment/FormatTime.hpp> 16 #include <stk_util/environment/FormatMemorySize.hpp> 23 int s_timeFormat = TIMEFORMAT_HMS | TIMEFORMAT_MILLIS;
38 s_timeFormat = time_format;
42 MetricTraits<LapCount>::Type
43 MetricTraits<LapCount>::value_now()
48 MetricTraits<CPUTime>::Type
49 MetricTraits<CPUTime>::value_now()
54 MetricTraits<WallTime>::Type
55 MetricTraits<WallTime>::value_now()
60 MetricTraits<MPICount>::Type
61 MetricTraits<MPICount>::value_now()
66 MetricTraits<MPIByteCount>::Type
67 MetricTraits<MPIByteCount>::value_now()
72 MetricTraits<HeapAlloc>::Type
73 MetricTraits<HeapAlloc>::value_now()
75 return ::malloc_used();
79 MetricTraits<LapCount>::table_header() {
84 MetricTraits<CPUTime>::table_header() {
89 MetricTraits<WallTime>::table_header() {
94 MetricTraits<MPICount>::table_header() {
99 MetricTraits<MPIByteCount>::table_header() {
100 return "MPI Byte Count";
104 MetricTraits<HeapAlloc>::table_header() {
105 return "Heap Allocated";
110 MetricTraits<CPUTime>::format(
111 MetricTraits<CPUTime>::Type time)
113 return formatTime(time, getTimerTimeFormat());
118 MetricTraits<WallTime>::format(
119 MetricTraits<WallTime>::Type time)
121 return formatTime(time, getTimerTimeFormat());
126 MetricTraits<MPICount>::format(
127 MetricTraits<MPICount>::Type count)
129 std::stringstream strout;
138 MetricTraits<MPIByteCount>::format(
139 MetricTraits<MPIByteCount>::Type count)
141 std::stringstream strout;
149 MetricTraits<HeapAlloc>::format(
150 MetricTraits<HeapAlloc>::Type count)
152 return formatMemorySize(count);
double wall_time()
Member function wall_time returns the epoch as a double precision value in seconds to "millisecond" a...
double cpu_time()
Member function cpu_time returns the accumulated cpu time for the process as a double precision value...
eastl::iterator_traits< InputIterator >::difference_type count(InputIterator first, InputIterator last, const T &value)