Bug 1201811 (part 2) - Don't print distribution stats if there was only 1 sample. r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 04 Sep 2015 01:45:13 -0700
changeset 261136 b77b0bda050313973e5f24b165528ef94079bf05
parent 261135 37c9cc67c1e9704eea0b6f186ed5d02e23d8f106
child 261137 5fe9ed3edd6811a662d40d05e37b0d66e9520d82
child 261204 d9a84b7facd403d41ca80a9042877155d4c1cb2e
push id29336
push usercbook@mozilla.com
push dateMon, 07 Sep 2015 10:01:38 +0000
treeherdermozilla-central@5fe9ed3edd68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1201811
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1201811 (part 2) - Don't print distribution stats if there was only 1 sample. r=erahm.
tools/power/rapl.cpp
--- a/tools/power/rapl.cpp
+++ b/tools/power/rapl.cpp
@@ -674,17 +674,17 @@ Finish()
   // is not true but the inaccuracy should be small in practice.
   double time = n * gSampleInterval_sec;
 
   printf("\n");
   printf("%d sample%s taken over a period of %.3f second%s\n",
     int(n), n == 1 ? "" : "s",
     n * gSampleInterval_sec, time == 1.0 ? "" : "s");
 
-  if (n == 0) {
+  if (n == 0 || n == 1) {
     exit(0);
   }
 
   // Compute the mean.
   double sum = std::accumulate(gTotals_W.begin(), gTotals_W.end(), 0.0);
   double mean = sum / n;
 
   // Compute the *population* standard deviation: