From be8b87885521110ea387831820d105d142de0206 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 8 Jun 2013 09:57:28 -0700 Subject: gras: query changes from thread query branch --- query/chart_global_counters.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'query/chart_global_counters.js') 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"); } -- cgit