summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJosh Blum2013-05-05 18:04:18 -0700
committerJosh Blum2013-05-05 18:04:18 -0700
commit07dad29e258c229e810a449ac0d6ba4d9fc7e1d6 (patch)
tree43f56035e29c552a91a02f6d412f9ae23dcbdd17 /python
parent9e486336d789addc2b9ad215485dc01751613e05 (diff)
downloadsandhi-07dad29e258c229e810a449ac0d6ba4d9fc7e1d6.tar.gz
sandhi-07dad29e258c229e810a449ac0d6ba4d9fc7e1d6.tar.bz2
sandhi-07dad29e258c229e810a449ac0d6ba4d9fc7e1d6.zip
query: print something if theres no counts
Diffstat (limited to 'python')
-rw-r--r--python/gras/query/chart_allocator_counts.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/gras/query/chart_allocator_counts.js b/python/gras/query/chart_allocator_counts.js
index cc06d24..5219672 100644
--- a/python/gras/query/chart_allocator_counts.js
+++ b/python/gras/query/chart_allocator_counts.js
@@ -35,12 +35,18 @@ GrasChartAllocatorCounts.prototype.update = function(point)
['Malloc\'d', 'times', 'allocation_count'],
];
+ var entries = 0;
$.each(stuff, function(contents_i, contents)
{
var dir = contents[0];
var units = contents[1];
var key = contents[2];
var count = (key in point)? point[key] : 0;
- if (count > 0) make_entry(dir, count.toString() + ' ' + units);
+ if (count > 0)
+ {
+ make_entry(dir, count.toString() + ' ' + units);
+ entries++;
+ }
});
+ if (entries == 0) make_entry("Counts", "none");
}