[cairo] [PATCH] Use a closed interval when eliminating outliers
from performance measurements
Jeff Muizelaar
jeff at infidigm.net
Wed Feb 28 10:37:21 PST 2007
When choosing the samples that are not outliers we use a half-open interval
(outlier_min <= x < outlier_max). This causes all of the samples to be
discarded when the interquartile range is 0 because none of them are less
than outlier_max. Fix the problem and make the test more consistent by
using a closed interval (outliner_min <= x <= outlier_max).
---
perf/cairo-stats.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perf/cairo-stats.c b/perf/cairo-stats.c
index ba652d0..2c6c7dc 100644
--- a/perf/cairo-stats.c
+++ b/perf/cairo-stats.c
@@ -75,7 +75,7 @@ _cairo_stats_compute (cairo_stats_t *stats,
i = min_valid;
num_valid = 0;
- while (i + num_valid < num_values && values[i+num_valid] < outlier_max)
+ while (i + num_valid < num_values && values[i+num_valid] <= outlier_max)
num_valid++;
stats->iterations = num_valid;
More information about the cairo
mailing list