Skip to content

Commit

Permalink
Update to new ekg-core stats names.
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Nov 8, 2018
1 parent d6ecdfe commit f17787b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
14 changes: 7 additions & 7 deletions assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ <h3>GC and memory statistics</h3>
</thead>
<tbody>
<tr>
<td>Maximum residency</td>
<td id="max-bytes-used" class="span3 value">0</td>
<td>Maximum live heap data</td>
<td id="max-live-bytes" class="span3 value">0</td>
</tr>
<tr>
<td>Current residency</td>
<td id="current-bytes-used" class="value">0</td>
<td>Current live heap data</td>
<td id="live-bytes" class="value">0</td>
</tr>
<tr>
<td>Maximum slop</td>
<td id="max-bytes-slop" class="value">0</td>
<td>Maximum slop (heap holes)</td>
<td id="max-slop-bytes" class="value">0</td>
</tr>
<tr>
<td>Current slop</td>
<td id="current-bytes-slop" class="value">0</td>
<td id="slop-bytes" class="value">0</td>
</tr>
<tr>
<td>Productivity (wall clock time)</td>
Expand Down
50 changes: 25 additions & 25 deletions assets/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,49 +333,49 @@ $(document).ready(function () {

function initAll() {
// Metrics
var current_bytes_used = function (stats) {
return stats.rts.gc.current_bytes_used.val;
var max_live_bytes = function (stats) {
return stats.rts.max_live_bytes.val;
};
var max_bytes_used = function (stats) {
return stats.rts.gc.max_bytes_used.val;
var live_bytes = function (stats) {
return stats.rts.gc.live_bytes.val;
};
var max_bytes_slop = function (stats) {
return stats.rts.gc.max_bytes_slop.val;
var max_slop_bytes = function (stats) {
return stats.rts.max_slop_bytes.val;
};
var current_bytes_slop = function (stats) {
return stats.rts.gc.current_bytes_slop.val;
var slop_bytes = function (stats) {
return stats.rts.gc.slop_bytes.val;
};
var productivity_wall_percent = function (stats, time, prev_stats, prev_time) {
if (prev_stats == undefined)
return null;
var mutator_ms = stats.rts.gc.mutator_wall_ms.val -
prev_stats.rts.gc.mutator_wall_ms.val;
var gc_ms = stats.rts.gc.gc_wall_ms.val -
prev_stats.rts.gc.gc_wall_ms.val;
return 100 * mutator_ms / (mutator_ms + gc_ms);
var mutator_ns = stats.rts.mutator_elapsed_ns.val -
prev_stats.rts.mutator_elapsed_ns.val;
var gc_ns = stats.rts.gc_elapsed_ns.val -
prev_stats.rts.gc_elapsed_ns.val;
return 100 * mutator_ns / (mutator_ns + gc_ns);
};
var productivity_cpu_percent = function (stats, time, prev_stats, prev_time) {
if (prev_stats == undefined)
return null;
var mutator_ms = stats.rts.gc.mutator_cpu_ms.val -
prev_stats.rts.gc.mutator_cpu_ms.val;
var gc_ms = stats.rts.gc.gc_cpu_ms.val -
prev_stats.rts.gc.gc_cpu_ms.val;
return 100 * mutator_ms / (mutator_ms + gc_ms);
var mutator_ns = stats.rts.mutator_cpu_ns.val -
prev_stats.rts.mutator_cpu_ns.val;
var gc_ns = stats.rts.gc_cpu_ns.val -
prev_stats.rts.gc_cpu_ns.val;
return 100 * mutator_ns / (mutator_ns + gc_ns);
};
var allocation_rate = function (stats, time, prev_stats, prev_time) {
if (prev_stats == undefined)
return null;
return 1000 * (stats.rts.gc.bytes_allocated.val -
prev_stats.rts.gc.bytes_allocated.val) /
return 1000 * (stats.rts.allocated_bytes.val -
prev_stats.rts.allocated_bytes.val) /
(time - prev_time);
};

addMetrics($("#metric-table"));

// Plots
addPlot($("#current-bytes-used-plot > div"),
[{ label: "residency", fn: current_bytes_used }],
[{ label: "residency", fn: live_bytes }],
{ yaxis: { tickFormatter: suffixFormatter } });
addPlot($("#allocation-rate-plot > div"),
[{ label: "rate", fn: allocation_rate }],
Expand All @@ -386,10 +386,10 @@ $(document).ready(function () {
{ yaxis: { tickDecimals: 1, tickFormatter: percentFormatter } });

// GC and memory statistics
addCounter($("#max-bytes-used"), max_bytes_used, formatSuffix);
addCounter($("#current-bytes-used"), current_bytes_used, formatSuffix);
addCounter($("#max-bytes-slop"), max_bytes_slop, formatSuffix);
addCounter($("#current-bytes-slop"), current_bytes_slop, formatSuffix);
addCounter($("#max-live-bytes"), max_live_bytes, formatSuffix);
addCounter($("#live-bytes"), live_bytes, formatSuffix);
addCounter($("#max-slop-bytes"), max_slop_bytes, formatSuffix);
addCounter($("#slop-bytes"), slop_bytes, formatSuffix);
addCounter($("#productivity-wall"), productivity_wall_percent, formatPercent);
addCounter($("#productivity-cpu"), productivity_cpu_percent, formatPercent);
addCounter($("#allocation-rate"), allocation_rate, formatRate);
Expand Down

0 comments on commit f17787b

Please sign in to comment.