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 @@
+
GC Stats
+
+
+
+ Maximum residency |
+ 0 |
+
+
+ Current residency |
+ 0 |
+
+
+ Maximum slop |
+ 0 |
+
+
+ Current slop |
+ 0 |
+
+
+ Productivity (wall clock time) |
+ 0 |
+
+
+ Productivity (cpu time) |
+ 0 |
+
+
+ Allocation rate |
+ 0 |
+
+
+
+
+
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();
});
});