[Spice-commits] server/display-channel.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue May 17 10:51:25 UTC 2016


 server/display-channel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aaa5853e39dec1583c9364acb85e24807c34c320
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Wed Jan 20 17:17:20 2016 +0000

    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 at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/display-channel.c b/server/display-channel.c
index 165d88b..7715b95 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -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)


More information about the Spice-commits mailing list