aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/io_stat.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2007-03-07 23:39:45 +0000
committerStephen Fisher <steve@stephen-fisher.com>2007-03-07 23:39:45 +0000
commit7389b3fabd08f8f4838a667053fb79a2e91d8207 (patch)
tree518642a08df06349745e0825c829e6a98ebc43de /gtk/io_stat.c
parentaf7bdd06dbfe88cd83e3d4b542e364b94bd4d817 (diff)
Add a "Bits/Tick" option to the IO Stats dialog to complement the
"Bytes/Tick" option. svn path=/trunk/; revision=20997
Diffstat (limited to 'gtk/io_stat.c')
-rw-r--r--gtk/io_stat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index ab4dd3e8a6..d94df0fa52 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -84,9 +84,10 @@ static const char *plot_style_name[MAX_PLOT_STYLES] = {
#define COUNT_TYPE_FRAMES 0
#define COUNT_TYPE_BYTES 1
-#define COUNT_TYPE_ADVANCED 2
-#define MAX_COUNT_TYPES 3
-static const char *count_type_names[MAX_COUNT_TYPES] = {"Packets/Tick", "Bytes/Tick", "Advanced..."};
+#define COUNT_TYPE_BITS 2
+#define COUNT_TYPE_ADVANCED 3
+#define MAX_COUNT_TYPES 4
+static const char *count_type_names[MAX_COUNT_TYPES] = {"Packets/Tick", "Bytes/Tick", "Bits/Tick", "Advanced..."};
/* unit is in ms */
#define MAX_TICK_VALUES 5
@@ -398,6 +399,8 @@ get_it_value(io_stat_t *io, int graph_id, int idx)
return it->frames;
case COUNT_TYPE_BYTES:
return it->bytes;
+ case COUNT_TYPE_BITS:
+ return (it->bytes * 8);
}