File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1818#include < cassert>
1919#include < chrono>
2020#include < functional>
21+ #include < iomanip>
22+ #include < ios>
2123#include < list>
2224#include < map>
2325#include < memory>
26+ #include < ostream>
2427#include < set>
2528#include < string>
2629#include < tuple>
@@ -106,6 +109,22 @@ class TimingAccumulatorDictionary {
106109 auto end () const { return dict_.end (); }
107110
108111 void WriteToJSON (const std::string &file_name);
112+
113+ friend std::ostream &operator <<(std::ostream &os,
114+ const TimingAccumulatorDictionary &tad) {
115+ os << std::fixed << std::setprecision (6 );
116+
117+ for (const auto &[name, acc] : tad.dict_ ) {
118+ os << name << " : " ;
119+ if (acc) {
120+ os << acc->GetTotalTime () << " (s)" ;
121+ } else {
122+ os << " (null)" ;
123+ }
124+ os << ' \n ' ;
125+ }
126+ return os;
127+ }
109128};
110129
111130} // namespace parthenon
You can’t perform that action at this time.
0 commit comments