summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-report.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-05-30 16:50:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-06-02 15:13:46 +0100
commit55f4e0e4e8c7df59bfc9e6ffea8daa065276e42f (patch)
tree1c0b6d35a05d787b2cf1ca4d16bac4f607a169cb /perf/cairo-perf-report.c
parentb7c03d4e400245fc2b2d748fe808a9724e61f22f (diff)
[perf] Change seperators from '-' to '.'
This allows the perf tests to use '-' in the name which is easier to read and differentiates with using '_' to separate source and operators.
Diffstat (limited to 'perf/cairo-perf-report.c')
-rw-r--r--perf/cairo-perf-report.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/perf/cairo-perf-report.c b/perf/cairo-perf-report.c
index 8a99b9d2b..a73538bb6 100644
--- a/perf/cairo-perf-report.c
+++ b/perf/cairo-perf-report.c
@@ -148,7 +148,7 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
report->configuration = configuration;
parse_string (report->backend);
- end = strrchr (report->backend, '-');
+ end = strrchr (report->backend, '.');
if (*end)
*end++ = '\0';
report->content = end;
@@ -156,7 +156,7 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
skip_space ();
parse_string (report->name);
- end = strrchr (report->name, '-');
+ end = strrchr (report->name, '.');
if (*end)
*end++ = '\0';
report->size = atoi (end);
@@ -173,13 +173,23 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
report->samples_size = 5;
report->samples = xmalloc (report->samples_size * sizeof (cairo_perf_ticks_t));
+ report->stats.min_ticks = 0;
do {
if (report->samples_count == report->samples_size) {
report->samples_size *= 2;
report->samples = xrealloc (report->samples,
report->samples_size * sizeof (cairo_perf_ticks_t));
}
- parse_long_long (report->samples[report->samples_count++]);
+ parse_long_long (report->samples[report->samples_count]);
+ if (report->samples_count == 0) {
+ report->stats.min_ticks =
+ report->samples[report->samples_count];
+ } else if (report->stats.min_ticks >
+ report->samples[report->samples_count]){
+ report->stats.min_ticks =
+ report->samples[report->samples_count];
+ }
+ report->samples_count++;
skip_space ();
} while (*s && *s != '\n');
report->stats.iterations = 0;