From 2e75e1584b4ad34df3999f9e0b270a0fdc246c67 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 2 Apr 2016 10:42:12 +0100
Subject: [PATCH] tests/qemu: boot-analysis: Display all times in ms.
It was confusing to have a mix of seconds and milliseconds. For all
upstream testing (eg. with SeaBIOS) we are discussing everything in
milliseconds, so use those exclusively.
(cherry picked from commit d470480b3564b45301a79047f919051b4e2e58b4)
---
tests/qemu/boot-analysis.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/qemu/boot-analysis.c b/tests/qemu/boot-analysis.c
index 022eaab..9ab228a 100644
--- a/tests/qemu/boot-analysis.c
+++ b/tests/qemu/boot-analysis.c
@@ -860,8 +860,8 @@ print_activity (struct activity *activity)
if (activity->warning) ansi_red (); else ansi_green ();
print_escaped_string (activity->name);
ansi_restore ();
- printf (" %1.6fs ±%.1fms ",
- activity->mean / 1000000000, activity->sd / 1000000);
+ printf (" %.1fms ±%.1fms ",
+ activity->mean / 1000000, activity->sd / 1000000);
if (activity->warning) ansi_red (); else ansi_green ();
printf ("(%.1f%%) ", activity->percent);
ansi_restore ();
@@ -906,7 +906,7 @@ print_analysis (void)
/* Draw a spacer line, but only if last_t -> t is a large jump. */
if (t - last_t >= 1000000 /* ns */) {
- printf (" ");
+ printf (" ");
ansi_magenta ();
for (j = 0; j < last_free_column; ++j) {
if (columns[j] >= 0 &&
@@ -946,7 +946,7 @@ print_analysis (void)
/* Draw the line. */
ansi_blue ();
- printf ("%1.6fs: ", t / 1000000000);
+ printf ("%6.1fms: ", t / 1000000);
ansi_magenta ();
for (j = 0; j < last_free_column; ++j) {
--
1.8.3.1