summaryrefslogtreecommitdiff
path: root/query/chart_global_counters.js
diff options
context:
space:
mode:
authorJosh Blum2013-06-08 09:57:28 -0700
committerJosh Blum2013-06-08 09:57:28 -0700
commitbe8b87885521110ea387831820d105d142de0206 (patch)
tree6efb66c0e128d2ce7ebc275a177d980dd5d04655 /query/chart_global_counters.js
parent3a24238960cdedb3a46eb3c5d2eee5d2bf8d806f (diff)
downloadsandhi-be8b87885521110ea387831820d105d142de0206.tar.gz
sandhi-be8b87885521110ea387831820d105d142de0206.tar.bz2
sandhi-be8b87885521110ea387831820d105d142de0206.zip
gras: query changes from thread query branch
Diffstat (limited to 'query/chart_global_counters.js')
-rw-r--r--query/chart_global_counters.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/query/chart_global_counters.js b/query/chart_global_counters.js
index 1708c01..cd5309d 100644
--- a/query/chart_global_counters.js
+++ b/query/chart_global_counters.js
@@ -29,11 +29,12 @@ GrasChartGlobalCounts.prototype.update = function(point)
ul.append(li);
}
- var stuff = [
+ var allocator_stuff = [
['Allocated', 'bytes', 'default_allocator_bytes_allocated'],
['Peak size', 'bytes', 'default_allocator_peak_bytes_allocated'],
['Num mallocs', '', 'default_allocator_allocation_count'],
-
+ ];
+ var framework_stuff = [
['Total msgs', '', 'framework_counter_messages_processed'],
['Thread yields', '', 'framework_counter_yields'],
['Local pushes', '', 'framework_counter_local_pushes'],
@@ -42,7 +43,7 @@ GrasChartGlobalCounts.prototype.update = function(point)
];
var entries = 0;
- $.each(stuff, function(contents_i, contents)
+ $.each(allocator_stuff, function(contents_i, contents)
{
var dir = contents[0];
var units = contents[1];
@@ -54,5 +55,21 @@ GrasChartGlobalCounts.prototype.update = function(point)
entries++;
}
});
+ $.each(point.thread_pools, function(tp_i, tp_info)
+ {
+ make_entry('ThreadPool' + tp_i.toString(), '');
+ $.each(framework_stuff, function(contents_i, contents)
+ {
+ var dir = contents[0];
+ var units = contents[1];
+ var key = contents[2];
+ var count = (key in tp_info)? tp_info[key] : 0;
+ if (count > 0)
+ {
+ make_entry(dir, count.toString() + ' ' + units);
+ entries++;
+ }
+ });
+ });
if (entries == 0) make_entry("Counts", "none");
}