summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-04 08:32:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-09-04 08:32:31 +0100
commit0ffca06d7feec6fdc56c47a378fcc37c1951a00a (patch)
tree5c3758856bbcb81217b64f16c15e030c490d86bf
parent00ca0780b8f06ec160d8f969e316c21fbbde04bc (diff)
[perf] Use milliseconds by default in cairo-perf-diff-files
Necessary when comparing performance reports from different machines (or even at different CPU states).
-rw-r--r--perf/cairo-perf-diff-files.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index dddf684d..2d3b0855 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -39,7 +39,7 @@ typedef struct _cairo_perf_report_options {
double min_change;
int use_utf;
int print_change_bars;
- int use_ms;
+ int use_ticks;
} cairo_perf_report_options_t;
typedef struct _cairo_perf_diff_files_args {
@@ -180,7 +180,7 @@ test_diff_print_multi (test_diff_t *diff,
for (i = 0; i < diff->num_tests; i++) {
test_time = diff->tests[i]->stats.min_ticks;
- if (options->use_ms)
+ if (! options->use_ticks)
test_time /= diff->tests[i]->stats.ticks_per_ms;
change = diff->max / test_time;
printf ("%8s %6.2f: %5.2fx ",
@@ -266,7 +266,7 @@ cairo_perf_reports_compare (cairo_perf_report_t *reports,
test_report_cmp_backend_then_name (tests[i], min_test) == 0)
{
test_time = tests[i]->stats.min_ticks;
- if (options->use_ms)
+ if (! options->use_ticks)
test_time /= tests[i]->stats.ticks_per_ms;
if (diff->num_tests == 0) {
diff->min = test_time;
@@ -294,7 +294,7 @@ cairo_perf_reports_compare (cairo_perf_report_t *reports,
}
old_time = diff->tests[0]->stats.min_ticks;
new_time = diff->tests[1]->stats.min_ticks;
- if (options->use_ms) {
+ if (! options->use_ticks) {
old_time /= diff->tests[0]->stats.ticks_per_ms;
new_time /= diff->tests[1]->stats.ticks_per_ms;
}
@@ -405,7 +405,10 @@ parse_args(int argc,
args->options.print_change_bars = 0;
}
else if (strcmp (argv[i], "--use-ms") == 0) {
- args->options.use_ms = 1;
+ /* default */
+ }
+ else if (strcmp (argv[i], "--use-ticks") == 0) {
+ args->options.use_ticks = 1;
}
else if (strcmp (argv[i], "--min-change") == 0) {
char *end = NULL;