diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-09-30 18:28:04 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-09-30 18:28:04 +0000 |
commit | 296d2900a1e2b132c98d828f14e19a0c47328764 (patch) | |
tree | a6a6e115aacac1053d28217e61b9dc934ccbc9b7 /ui/gtk/main_statusbar.c | |
parent | ee56ee5181d865ff75799411c94ff539f9b7f78c (diff) | |
download | wireshark-296d2900a1e2b132c98d828f14e19a0c47328764.tar.gz |
Add displayed and marked percent columns and percent calculations for dropped and ignored packets in summary dialog. Also display percent calculations for displayed, marked, ignored and dropped packets in statusbar. Like ignored packets, only display marked packet count and percent in the statusbar if there are any.
Fixes enhancement bug: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2377
svn path=/trunk/; revision=45226
Diffstat (limited to 'ui/gtk/main_statusbar.c')
-rw-r--r-- | ui/gtk/main_statusbar.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ui/gtk/main_statusbar.c b/ui/gtk/main_statusbar.c index f579c0c35e..53ec9b9bab 100644 --- a/ui/gtk/main_statusbar.c +++ b/ui/gtk/main_statusbar.c @@ -494,13 +494,22 @@ packets_bar_update(void) /* Do we have any packets? */ if(cfile.count) { - g_string_printf(packets_str, " Packets: %u " UTF8_MIDDLE_DOT " Displayed: %u " UTF8_MIDDLE_DOT " Marked: %u", - cfile.count, cfile.displayed_count, cfile.marked_count); + g_string_printf(packets_str, " Packets: %u " UTF8_MIDDLE_DOT + " Displayed: %u (%.1f%%) ", + cfile.count, + cfile.displayed_count, + (100.0 * cfile.displayed_count)/cfile.count); + if(cfile.marked_count) { + g_string_append_printf(packets_str, " " UTF8_MIDDLE_DOT " Marked: %u (%.1f%%)", + cfile.marked_count, (100.0 * cfile.marked_count)/cfile.count); + } if(cfile.drops_known) { - g_string_append_printf(packets_str, " " UTF8_MIDDLE_DOT " Dropped: %u", cfile.drops); + g_string_append_printf(packets_str, " " UTF8_MIDDLE_DOT " Dropped: %u (%.1f%%)", + cfile.drops, (100.0 * cfile.drops)/cfile.count); } - if(cfile.ignored_count > 0) { - g_string_append_printf(packets_str, " " UTF8_MIDDLE_DOT " Ignored: %u", cfile.ignored_count); + if(cfile.ignored_count) { + g_string_append_printf(packets_str, " " UTF8_MIDDLE_DOT " Ignored: %u (%.1f%%)", + cfile.ignored_count, (100.0 * cfile.ignored_count)/cfile.count); } if(!cfile.is_tempfile){ /* Loading an existing file */ |