diff --git a/public/index.html b/public/index.html index dacf86d..d30b7e8 100644 --- a/public/index.html +++ b/public/index.html @@ -38,39 +38,48 @@

Productivity

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Maximum residency0
Current residency0
Maximum slop0
Current slop0
Productivity (wall clock time)0
Productivity (cpu time)0
Allocation rate0
+ +
+

GC Stats

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Maximum residency0
Current residency0
Maximum slop0
Current slop0
Productivity (wall clock time)0
Productivity (cpu time)0
Allocation rate0
+ +

Counters

+ + + +
+
diff --git a/public/monitor.js b/public/monitor.js index bd187a6..cb4464f 100644 --- a/public/monitor.js +++ b/public/monitor.js @@ -132,6 +132,28 @@ $(function () { listeners.push(onDataReceived); } + function addDynamicCounters() { + var counters = {}; + function onDataReceived(stats, time) { + $.each(stats, function(key, value) { + var elem; + if (key in counters) { + elem = counters[key]; + } else { + // Add UI element + $("#counter-table > tbody:last").append( + '' + key + 'N/A'); + elem = $("#counter-table > tbody > tr > td:last"); + counters[key] = elem; + } + if (!paused) + elem.text(value); + }); + } + + listeners.push(onDataReceived); + } + $(document).ready(function() { // Metrics var current_bytes_used = function(stats) { return stats.current_bytes_used }; @@ -181,5 +203,7 @@ $(function () { addCounter($("#productivity-wall"), productivity_wall_percent, formatPercent) addCounter($("#productivity-cpu"), productivity_cpu_percent, formatPercent) addCounter($("#allocation-rate"), allocation_rate, formatRate) + + addDynamicCounters(); }); });