Index: llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
+++ llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
@@ -195,22 +195,30 @@
OS << "
";
writeClusterId(OS, CurrentClusterId);
OS << " | ";
- const auto &ClusterRepresentative =
- Points[PointIds[I]]; // FIXME: average measurements.
+ std::vector MeasurementStats(
+ Points[PointIds[I]].Measurements.size());
for (; I < E &&
Clustering_.getClusterIdForPoint(PointIds[I]) == CurrentClusterId;
++I) {
+ const auto &Point = Points[PointIds[I]];
OS << "- ";
- writeEscaped(OS, Points[PointIds[I]].Key.OpcodeName);
+ writeEscaped(OS, Point.Key.OpcodeName);
OS << " ";
- writeEscaped(OS, Points[PointIds[I]].Key.Config);
+ writeEscaped(OS, Point.Key.Config);
OS << "
";
+ for (size_t J = 0, F = Point.Measurements.size(); J < F; ++J) {
+ MeasurementStats[J].push(Point.Measurements[J]);
+ }
}
OS << " | ";
- for (const auto &Measurement : ClusterRepresentative.Measurements) {
- OS << "";
- writeMeasurementValue(OS, Measurement.Value);
- OS << " | ";
+ for (const auto &Stats : MeasurementStats) {
+ OS << "";
+ writeMeasurementValue(OS, Stats.avg());
+ OS << " [";
+ writeMeasurementValue(OS, Stats.min());
+ OS << ";";
+ writeMeasurementValue(OS, Stats.max());
+ OS << "] | ";
}
OS << "
";
}
@@ -321,7 +329,7 @@
writeEscaped