diff options
-rw-r--r-- | src/passes/Metrics.cpp | 3 | ||||
-rw-r--r-- | test/passes/metrics.txt | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/passes/Metrics.cpp b/src/passes/Metrics.cpp index 8890c3cc3..c18d1d7cd 100644 --- a/src/passes/Metrics.cpp +++ b/src/passes/Metrics.cpp @@ -44,6 +44,8 @@ struct Metrics : public WalkerPass<PostWalker<Metrics, UnifiedExpressionVisitor< keys.push_back(i.first); total += i.second; } + keys.push_back("[total]"); + counts["[total]"] = total; sort(keys.begin(), keys.end(), [](const char* a, const char* b) -> bool { return strcmp(b, a) > 0; }); @@ -69,7 +71,6 @@ struct Metrics : public WalkerPass<PostWalker<Metrics, UnifiedExpressionVisitor< } o << "\n"; } - o << left << setw(16) << "Total" << ": " << setw(8) << total << '\n'; lastMetricsPass = this; } }; diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt index 05a69c5aa..5824a2769 100644 --- a/test/passes/metrics.txt +++ b/test/passes/metrics.txt @@ -1,9 +1,9 @@ Counts + [total] : 18 binary : 1 block : 1 const : 12 if : 4 -Total : 18 (module (memory 256 256) (func $ifs |