summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-diff-files.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-04-13 13:34:20 -0700
committerCarl Worth <cworth@cworth.org>2007-04-13 13:36:49 -0700
commitef3e13337e513cf470801cff5cd2b8fdcff1b6eb (patch)
treefe1851b1e6a2e2ad960184711d03bc7457e9ee43 /perf/cairo-perf-diff-files.c
parent7ead3e64f17fe302398ec60c61eaeaae4e9b18cf (diff)
downloadcairo-ef3e13337e513cf470801cff5cd2b8fdcff1b6eb.tar.gz
cairo-perf-diff: Use median not minimum to report differences
Ideally, the minimum value would indicate the best possible performance, but I've encountered situations where a bogus minimum value gets lodged into the cached results for some reason, (and yet doesn't also get discarded as an outlier). The downside of that situation is that running more iterations never changes the result, so it's hard to fix the problem, (resulting in cairo-perf-diff feeling just plain broken as more runs change nothing). So let's try using the median time instead.
Diffstat (limited to 'perf/cairo-perf-diff-files.c')
-rw-r--r--perf/cairo-perf-diff-files.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index 8b6292a40..e5383793b 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -536,11 +536,11 @@ cairo_perf_report_diff (cairo_perf_report_t *old,
diffs[num_diffs].new = n;
if (args->use_ms) {
diffs[num_diffs].speedup =
- (double) (o->stats.min_ticks / o->stats.ticks_per_ms)
- / (n->stats.min_ticks / n->stats.ticks_per_ms);
+ (double) (o->stats.median_ticks / o->stats.ticks_per_ms)
+ / (n->stats.median_ticks / n->stats.ticks_per_ms);
} else {
diffs[num_diffs].speedup =
- (double) o->stats.min_ticks / n->stats.min_ticks;
+ (double) o->stats.median_ticks / n->stats.median_ticks;
}
num_diffs++;
@@ -591,9 +591,9 @@ cairo_perf_report_diff (cairo_perf_report_t *old,
printf ("%5s-%-4s %26s-%-3d %6.2f %4.2f%% -> %6.2f %4.2f%%: %5.2fx ",
diff->old->backend, diff->old->content,
diff->old->name, diff->old->size,
- diff->old->stats.min_ticks / diff->old->stats.ticks_per_ms,
+ diff->old->stats.median_ticks / diff->old->stats.ticks_per_ms,
diff->old->stats.std_dev * 100,
- diff->new->stats.min_ticks / diff->new->stats.ticks_per_ms,
+ diff->new->stats.median_ticks / diff->new->stats.ticks_per_ms,
diff->new->stats.std_dev * 100,
change);