From 272f06dd42d7e4b3283399d974e1efaddaa644a4 Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric@anholt.net>
Date: Wed, 24 Oct 2012 12:24:02 -0700
Subject: [PATCH] cairo-perf-trace: Print times in seconds.

It still gives lots of precision, but now the numbers are something quickly
meaningful to people instead of having to count digits.
---
 perf/cairo-perf-trace.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index f27f8e4..64820a3 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -676,8 +676,8 @@ cairo_perf_trace (cairo_perf_t			   *perf,
 
     if (first_run) {
 	if (perf->raw) {
-	    printf ("[ # ] %s.%-s %s %s %s ...\n",
-		    "backend", "content", "test-size", "ticks-per-ms", "time(ticks)");
+	    printf ("[ # ] %s.%-s %s %s ...\n",
+		    "backend", "content", "test-size", "time(secs)");
 	}
 
 	if (perf->summary) {
@@ -796,13 +796,12 @@ cairo_perf_trace (cairo_perf_t			   *perf,
 
 	if (perf->raw) {
 	    if (i == 0)
-		printf ("[*] %s.%s %s.%d %g",
+		printf ("[*] %s.%s %s.%d",
 			perf->target->name,
 			"rgba",
 			name,
-			0,
-			_cairo_time_to_double (_cairo_time_from_s (1)) / 1000.);
-	    printf (" %lld", (long long) times[i]);
+			0);
+	    printf (" %f", _cairo_time_to_s(times[i]));
 	    fflush (stdout);
 	} else if (! perf->exact_iterations) {
 	    if (i > CAIRO_PERF_MIN_STD_DEV_COUNT) {
-- 
1.8.3.rc0

