9 #ifndef stk_util_diag_TimerMetricTraits_hpp 10 #define stk_util_diag_TimerMetricTraits_hpp 17 typedef unsigned long MetricsMask;
25 void setTimerTimeFormat(
int time_format);
31 int getTimerTimeFormat();
39 METRICS_LAP_COUNT = 0x0001,
40 METRICS_CPU_TIME = 0x0002,
41 METRICS_WALL_TIME = 0x0004,
42 METRICS_MPI_COUNT = 0x0008,
43 METRICS_MPI_BYTE_COUNT = 0x0010,
44 METRICS_HEAP_ALLOC = 0x0020,
47 METRICS_FORCE = 0x8000
64 typedef unsigned Type;
65 enum {METRIC = METRICS_LAP_COUNT};
66 static Type value_now();
67 static std::string table_header();
68 static std::string format(Type time);
72 struct MetricTraits<CPUTime>
75 enum {METRIC = METRICS_CPU_TIME};
76 static Type value_now();
77 static std::string table_header();
78 static std::string format(Type time);
82 struct MetricTraits<WallTime>
85 enum {METRIC = METRICS_WALL_TIME};
86 static Type value_now();
87 static std::string table_header();
88 static std::string format(Type time);
92 struct MetricTraits<MPICount>
95 enum {METRIC = METRICS_MPI_COUNT};
96 static Type value_now();
97 static std::string table_header();
98 static std::string format(Type count);
102 struct MetricTraits<MPIByteCount>
105 enum {METRIC = METRICS_MPI_BYTE_COUNT};
106 static Type value_now();
107 static std::string table_header();
108 static std::string format(Type count);
113 struct MetricTraits<HeapAlloc>
116 enum {METRIC = METRICS_HEAP_ALLOC};
117 static Type value_now();
118 static std::string table_header();
119 static std::string format(Type count);
123 typename MetricTraits<T>::Type now() {
124 return MetricTraits<T>::value_now();
130 #endif // stk_util_diag_TimerMetricTraits_hpp
MPI call count metric tag.
MPI byte count metric tag.
Heap allocation metric tag.