[llvm-exegesis] Analysis: Show value extents.

Summary: Screenshot attached in phabricator.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D47318

llvm-svn: 333181
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index b1083f4..ed449db 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -104,4 +104,14 @@
   }
 }
 
+void BenchmarkMeasureStats::push(const BenchmarkMeasure &BM) {
+  if (Key.empty())
+    Key = BM.Key;
+  assert(Key == BM.Key);
+  ++NumValues;
+  SumValues += BM.Value;
+  MaxValue = std::max(MaxValue, BM.Value);
+  MinValue = std::min(MinValue, BM.Value);
+}
+
 } // namespace exegesis