summaryrefslogtreecommitdiff
path: root/python/gras/query/chart_total_io_counts.js
diff options
context:
space:
mode:
Diffstat (limited to 'python/gras/query/chart_total_io_counts.js')
-rw-r--r--python/gras/query/chart_total_io_counts.js31
1 files changed, 19 insertions, 12 deletions
diff --git a/python/gras/query/chart_total_io_counts.js b/python/gras/query/chart_total_io_counts.js
index 2f9ced3..f959414 100644
--- a/python/gras/query/chart_total_io_counts.js
+++ b/python/gras/query/chart_total_io_counts.js
@@ -21,20 +21,29 @@ GrasChartTotalIoCounts.prototype.update = function(point)
$('ul', this.div).remove(); //clear old lists
this.div.append(ul);
+ function make_entry(strong, span)
{
- var init_time = parseInt(block_data.init_time);
- var stats_time = parseInt(block_data.stats_time);
- var tps = parseInt(block_data.tps);
- var duration = (stats_time - init_time)/tps;
var li = $('<li />');
- var strong = $('<strong />').text('Elapsed' + ': ');
- var span = $('<span />').text(duration.toFixed(2).toString() + ' secs');
+ var strong = $('<strong />').text(strong + ": ");
+ var span = $('<span />').text(span);
li.append(strong);
li.append(span);
ul.append(li);
}
+ //create total time elapsed entry
+ {
+ var init_time = block_data.init_time;
+ var stats_time = block_data.stats_time;
+ var tps = block_data.tps;
+ var duration = (stats_time - init_time)/tps;
+ make_entry('Elapsed', duration.toFixed(2).toString() + ' secs');
+ }
+
var stuff = [
+ ['Enque', 'items', 'items_enqueued'],
+ ['Enque', 'tags', 'tags_enqueued'],
+ ['Enque', 'msgs', 'msgs_enqueued'],
['Input', 'items', 'items_consumed'],
['Input', 'tags', 'tags_consumed'],
['Input', 'msgs', 'msgs_consumed'],
@@ -50,12 +59,10 @@ GrasChartTotalIoCounts.prototype.update = function(point)
var key = contents[2];
$.each(block_data[key], function(index, count)
{
- var li = $('<li />');
- var strong = $('<strong />').text(dir + index.toString() + ': ');
- var span = $('<span />').text(count.toString() + ' ' + units);
- li.append(strong);
- li.append(span);
- if (count > 0) ul.append(li);
+ if (count > 0)
+ {
+ make_entry(dir + index.toString(), count.toString() + ' ' + units);
+ }
});
});
}