[cairo-commit] perf/cairo-perf-diff.c
Carl Worth
cworth at kemper.freedesktop.org
Wed Oct 18 15:47:27 PDT 2006
perf/cairo-perf-diff.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
New commits:
diff-tree 99e2e99a78e492196a76e76cb47e463223db3012 (from 40e1c0246da1e79b70d4b89b7735e6fec329c56e)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Oct 18 15:47:18 2006 -0700
Use zero-size change bar for a speedup/slowdown of 1.0
Also use speedup/slowdown rather than faster/slower in the output
diff --git a/perf/cairo-perf-diff.c b/perf/cairo-perf-diff.c
index acbef43..eb2ef9f 100644
--- a/perf/cairo-perf-diff.c
+++ b/perf/cairo-perf-diff.c
@@ -291,6 +291,10 @@ print_change_bar (double change, double
{
int units_per_cell = (int) ceil (max_change / CHANGE_BAR_WIDTH);
+ /* For a 1.0x speedup we want a zero-size bar to show "no
+ * change". */
+ change -= 1.0;
+
while (change > units_per_cell) {
printf("â");
change -= units_per_cell;
@@ -423,9 +427,9 @@ cairo_perf_report_diff (cairo_perf_repor
change);
if (diff->speedup > 1.0)
- printf ("faster\n");
+ printf ("speedup\n");
else
- printf ("slower\n");
+ printf ("slowdown\n");
print_change_bar (change, max_change);
}
More information about the cairo-commit
mailing list