File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11#include < algorithm>
22#include < chrono>
3+ #include < iomanip>
34#include < iostream>
45#include < set>
56#include < sstream>
@@ -120,11 +121,15 @@ class LoweringLogger {
120121
121122 ~LoweringLogger () {
122123 if (time_lowering_passes) {
124+ double total = 0.0 ;
123125 debug (0 ) << " Lowering pass runtimes:\n " ;
124126 std::sort (timings.begin (), timings.end ());
125127 for (const auto &p : timings) {
126- debug (0 ) << " " << p.first << " ms : " << p.second << " \n " ;
128+ total += p.first ;
129+ debug (0 ) << std::setw (10 ) << std::fixed << std::setprecision (3 ) << p.first << " ms : "
130+ << p.second << " \n " ;
127131 }
132+ debug (0 ) << std::setw (10 ) << std::fixed << std::setprecision (3 ) << total << " ms in total\n " ;
128133 }
129134 }
130135};
You can’t perform that action at this time.
0 commit comments