Skip to content

Commit f17787b

Browse files
committed
Update to new ekg-core stats names.
See haskell-github-trust/ekg-core#30
1 parent d6ecdfe commit f17787b

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

Diff for: assets/index.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ <h3>GC and memory statistics</h3>
6565
</thead>
6666
<tbody>
6767
<tr>
68-
<td>Maximum residency</td>
69-
<td id="max-bytes-used" class="span3 value">0</td>
68+
<td>Maximum live heap data</td>
69+
<td id="max-live-bytes" class="span3 value">0</td>
7070
</tr>
7171
<tr>
72-
<td>Current residency</td>
73-
<td id="current-bytes-used" class="value">0</td>
72+
<td>Current live heap data</td>
73+
<td id="live-bytes" class="value">0</td>
7474
</tr>
7575
<tr>
76-
<td>Maximum slop</td>
77-
<td id="max-bytes-slop" class="value">0</td>
76+
<td>Maximum slop (heap holes)</td>
77+
<td id="max-slop-bytes" class="value">0</td>
7878
</tr>
7979
<tr>
8080
<td>Current slop</td>
81-
<td id="current-bytes-slop" class="value">0</td>
81+
<td id="slop-bytes" class="value">0</td>
8282
</tr>
8383
<tr>
8484
<td>Productivity (wall clock time)</td>

Diff for: assets/monitor.js

+25-25
Original file line numberDiff line numberDiff line change
@@ -333,49 +333,49 @@ $(document).ready(function () {
333333

334334
function initAll() {
335335
// Metrics
336-
var current_bytes_used = function (stats) {
337-
return stats.rts.gc.current_bytes_used.val;
336+
var max_live_bytes = function (stats) {
337+
return stats.rts.max_live_bytes.val;
338338
};
339-
var max_bytes_used = function (stats) {
340-
return stats.rts.gc.max_bytes_used.val;
339+
var live_bytes = function (stats) {
340+
return stats.rts.gc.live_bytes.val;
341341
};
342-
var max_bytes_slop = function (stats) {
343-
return stats.rts.gc.max_bytes_slop.val;
342+
var max_slop_bytes = function (stats) {
343+
return stats.rts.max_slop_bytes.val;
344344
};
345-
var current_bytes_slop = function (stats) {
346-
return stats.rts.gc.current_bytes_slop.val;
345+
var slop_bytes = function (stats) {
346+
return stats.rts.gc.slop_bytes.val;
347347
};
348348
var productivity_wall_percent = function (stats, time, prev_stats, prev_time) {
349349
if (prev_stats == undefined)
350350
return null;
351-
var mutator_ms = stats.rts.gc.mutator_wall_ms.val -
352-
prev_stats.rts.gc.mutator_wall_ms.val;
353-
var gc_ms = stats.rts.gc.gc_wall_ms.val -
354-
prev_stats.rts.gc.gc_wall_ms.val;
355-
return 100 * mutator_ms / (mutator_ms + gc_ms);
351+
var mutator_ns = stats.rts.mutator_elapsed_ns.val -
352+
prev_stats.rts.mutator_elapsed_ns.val;
353+
var gc_ns = stats.rts.gc_elapsed_ns.val -
354+
prev_stats.rts.gc_elapsed_ns.val;
355+
return 100 * mutator_ns / (mutator_ns + gc_ns);
356356
};
357357
var productivity_cpu_percent = function (stats, time, prev_stats, prev_time) {
358358
if (prev_stats == undefined)
359359
return null;
360-
var mutator_ms = stats.rts.gc.mutator_cpu_ms.val -
361-
prev_stats.rts.gc.mutator_cpu_ms.val;
362-
var gc_ms = stats.rts.gc.gc_cpu_ms.val -
363-
prev_stats.rts.gc.gc_cpu_ms.val;
364-
return 100 * mutator_ms / (mutator_ms + gc_ms);
360+
var mutator_ns = stats.rts.mutator_cpu_ns.val -
361+
prev_stats.rts.mutator_cpu_ns.val;
362+
var gc_ns = stats.rts.gc_cpu_ns.val -
363+
prev_stats.rts.gc_cpu_ns.val;
364+
return 100 * mutator_ns / (mutator_ns + gc_ns);
365365
};
366366
var allocation_rate = function (stats, time, prev_stats, prev_time) {
367367
if (prev_stats == undefined)
368368
return null;
369-
return 1000 * (stats.rts.gc.bytes_allocated.val -
370-
prev_stats.rts.gc.bytes_allocated.val) /
369+
return 1000 * (stats.rts.allocated_bytes.val -
370+
prev_stats.rts.allocated_bytes.val) /
371371
(time - prev_time);
372372
};
373373

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

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

388388
// GC and memory statistics
389-
addCounter($("#max-bytes-used"), max_bytes_used, formatSuffix);
390-
addCounter($("#current-bytes-used"), current_bytes_used, formatSuffix);
391-
addCounter($("#max-bytes-slop"), max_bytes_slop, formatSuffix);
392-
addCounter($("#current-bytes-slop"), current_bytes_slop, formatSuffix);
389+
addCounter($("#max-live-bytes"), max_live_bytes, formatSuffix);
390+
addCounter($("#live-bytes"), live_bytes, formatSuffix);
391+
addCounter($("#max-slop-bytes"), max_slop_bytes, formatSuffix);
392+
addCounter($("#slop-bytes"), slop_bytes, formatSuffix);
393393
addCounter($("#productivity-wall"), productivity_wall_percent, formatPercent);
394394
addCounter($("#productivity-cpu"), productivity_cpu_percent, formatPercent);
395395
addCounter($("#allocation-rate"), allocation_rate, formatRate);

0 commit comments

Comments
 (0)