We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e7a9b0 commit 417b789Copy full SHA for 417b789
lib/AST/RequirementMachine/Histogram.h
@@ -35,6 +35,7 @@ class Histogram {
35
unsigned Start;
36
std::vector<unsigned> Buckets;
37
unsigned OverflowBucket;
38
+ unsigned MaxValue = 0;
39
40
const unsigned MaxWidth = 40;
41
@@ -73,6 +74,9 @@ class Histogram {
73
74
++OverflowBucket;
75
else
76
++Buckets[value];
77
+
78
+ if (value > MaxValue)
79
+ MaxValue = value;
80
}
81
82
/// Print a nice-looking graphical representation of the histogram.
@@ -140,6 +144,8 @@ class Histogram {
140
144
141
145
out << std::string(maxLabelWidth, ' ') << " | ";
142
146
out << "Total: " << sumValues << "\n";
147
+ out << std::string(maxLabelWidth, ' ') << " | ";
148
+ out << "Max: " << MaxValue << "\n";
143
149
150
};
151
0 commit comments