stats: change image statistics format

Change from %f to %g. This allows printf to choose format based on
order of numbers.
Also increase precision making sure that number of precision is
respected, not matter the order of the number.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-01-20 17:17:20 +00:00
parent cd1e1e3d9b
commit aaa5853e39

View File

@ -46,7 +46,7 @@ void display_channel_compress_stats_reset(DisplayChannel *display)
stat_reset(&display->lz4_stat);
}
#define STAT_FMT "%s\t%8d\t%13.2f\t%12.2f\t%12.2f"
#define STAT_FMT "%s\t%8u\t%13.8g\t%12.8g\t%12.8g"
#ifdef COMPRESS_STAT
static void stat_print_one(const char *name, const stat_info_t *stat)