summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-05-24 12:41:02 +0000
committerClement Courbet <courbet@google.com>2018-05-24 12:41:02 +0000
commitae8ae5dc78b8c6950b57b37706dfc37131d4d913 (patch)
treeb2db1517539526a5e3653bc38c881607eb1eaa0f /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
parent13f8a77d79ed48da17ee61e0ba1357418ad2d706 (diff)
downloadbcm5719-llvm-ae8ae5dc78b8c6950b57b37706dfc37131d4d913.tar.gz
bcm5719-llvm-ae8ae5dc78b8c6950b57b37706dfc37131d4d913.zip
[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
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index b1083f4ed0a..ed449dbd94e 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -104,4 +104,14 @@ void InstructionBenchmark::writeYamlOrDie(const llvm::StringRef Filename) {
}
}
+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
OpenPOWER on IntegriCloud