diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-29 22:47:59 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-29 22:47:59 +0000 |
commit | 60d6b05e2340ae90c09fbdd2f25b6513131a0bd1 (patch) | |
tree | b6e5a1637da1197aa7faad6cd480693ee1deee13 /ui/cli | |
parent | eaaf4437aba897df51bfb31829f98cf198dd1887 (diff) | |
download | wireshark-60d6b05e2340ae90c09fbdd2f25b6513131a0bd1.tar.gz |
Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen
- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.
svn path=/trunk/; revision=53657
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-stats_tree.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c index 7e893c39af..345e898579 100644 --- a/ui/cli/tap-stats_tree.c +++ b/ui/cli/tap-stats_tree.c @@ -54,23 +54,12 @@ draw_stats_tree(void *psp) { stats_tree *st = (stats_tree *)psp; GString *s; - gchar *fmt; - stat_node *child; - - s = g_string_new("\n===================================================================\n"); - fmt = g_strdup_printf(" %%s%%-%us%%12s\t%%12s\t%%12s\n",stats_tree_branch_max_namelen(&st->root,0)); - g_string_append_printf(s,fmt,"",st->cfg->name,"value","rate","percent"); - g_free(fmt); - g_string_append_printf(s,"-------------------------------------------------------------------\n"); - - for (child = st->root.children; child; child = child->next ) { - stats_tree_branch_to_str(child,s,0); - } - - s = g_string_append(s,"\n===================================================================\n"); + s= stats_tree_format_as_str(st, ST_FORMAT_PLAIN, stats_tree_get_default_sort_col(st), + stats_tree_is_default_sort_DESC(st)); + printf("%s",s->str); - + g_string_free(s,TRUE); } static void |