summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-01-17 12:45:37 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-01-17 12:45:37 +0000
commit66fd6fec65238b6afcc6b073d91796aed0352315 (patch)
treef04777b87c6c432de6001bc932b9116caf11c04e
parentce2919d6edadeda2efaea217ded3f84a18c8fd71 (diff)
Use similar output for single/multi sample probes
Always print out the number of samples and the total time, regardless of the number of samples; in case we have more than one sample, be more specific and add the average, minimum, maximum, and standard deviation.
-rw-r--r--endless/eosprofile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/endless/eosprofile.c b/endless/eosprofile.c
index 8f79e37..23959b3 100644
--- a/endless/eosprofile.c
+++ b/endless/eosprofile.c
@@ -454,8 +454,9 @@ profile_state_dump_to_console (void)
g_autofree char *stddev = g_strdup_printf (", σ:%g", s);
msg =
- g_strdup_printf ("%d samples: avg:%g %s, min:%d %s, max:%d %s%s)",
+ g_strdup_printf ("%d samples: total:%d %s, avg:%g %s, min:%d %s, max:%d %s%s",
valid_samples->len,
+ (int) scale_val (total), unit_for (total),
scale_val (avg), unit_for (avg),
(int) scale_val (min_sample), unit_for (min_sample),
(int) scale_val (max_sample), unit_for (max_sample),
@@ -463,7 +464,7 @@ profile_state_dump_to_console (void)
}
else if (valid_samples->len == 1)
{
- msg = g_strdup_printf ("total time:%d %s",
+ msg = g_strdup_printf ("1 sample: total:%d %s",
(int) scale_val (total),
unit_for (total));
}