[PATCH 06/21] perf, stat: FIXME Stddev calculation is incorrect
From: Don Zickus
Date: Mon Feb 10 2014 - 12:30:57 EST
Fix the standard deviation calculation. The current calculation
does the standard deviation mean which is slightly different.
Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
---
tools/perf/util/stat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 6506b3d..58aa661 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -47,7 +47,8 @@ double stddev_stats(struct stats *stats)
return 0.0;
variance = stats->M2 / (stats->n - 1);
- variance_mean = variance / stats->n;
+ //variance_mean = variance / stats->n;
+ variance_mean = variance;
return sqrt(variance_mean);
}
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/