2 * Copyright © 2006 Red Hat, Inc.
3 * Copyright © 2009 Chris Wilson
5 * Permission to use, copy, modify, distribute, and sell this software
6 * and its documentation for any purpose is hereby granted without
7 * fee, provided that the above copyright notice appear in all copies
8 * and that both that copyright notice and this permission notice
9 * appear in supporting documentation, and that the name of the
10 * copyright holders not be used in advertising or publicity
11 * pertaining to distribution of the software without specific,
12 * written prior permission. The copyright holders make no
13 * representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied
17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
18 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
22 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
23 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
26 * Authors: Carl Worth <cworth@cworth.org>
27 * Chris Wilson <chris@chris-wilson.co.uk>
30 #include "cairo-perf.h"
35 report_print (const cairo_perf_report_t *report)
37 const test_report_t *tests;
39 tests = report->tests;
40 for (tests = report->tests; tests->name != NULL; tests++) {
41 if (tests->stats.iterations == 0)
45 printf ("%5s-%-4s %26s-%-3d %6.2f %4.2f%%\n",
46 tests->backend, tests->content,
47 tests->name, tests->size,
48 tests->stats.median_ticks / tests->stats.ticks_per_ms,
49 tests->stats.std_dev * 100);
51 printf ("%5s %26s %6.2f %4.2f%%\n",
52 tests->backend, tests->name,
53 tests->stats.median_ticks / tests->stats.ticks_per_ms,
54 tests->stats.std_dev * 100);
65 for (i = 1; i < argc; i++ ) {
66 cairo_perf_report_t report;
68 cairo_perf_report_load (&report, argv[i], i, NULL);
69 report_print (&report);