Add + or - sign to drop packets and drop rates 63/63463/1
authorahothan <ahothan@cisco.com>
Fri, 12 Oct 2018 18:49:02 +0000 (11:49 -0700)
committerahothan <ahothan@cisco.com>
Fri, 12 Oct 2018 18:49:02 +0000 (11:49 -0700)
Change-Id: I76da22b1ca232f6d222e4a263a42c669da15fb26
Signed-off-by: ahothan <ahothan@cisco.com>
nfvbench/summarizer.py

index 4e70294..0d84ab2 100644 (file)
@@ -64,7 +64,7 @@ def _annotate_chain_stats(chain_stats, nodrop_marker='=>'):
                     drop = cur_count - prev_count
                     if drop:
                         dr = (drop * 100.0) / prev_count if prev_count else 0
-                        annotated_value = '{:,} ({:.4f}%)'.format(drop, dr)
+                        annotated_value = '{:+,} ({:+.4f}%)'.format(drop, dr)
                     else:
                         # no drop
                         # if last column we display the value