Skip to content

Commit ebd6a00

Browse files
committed
Normalize all plots
1 parent d08995c commit ebd6a00

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

docs/assets/benchmarks.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function load_json(filename, callback) {
2626
}
2727

2828
function normalize(x, unit_scale) {
29-
scale = 1 / unit_scale;
29+
scale = 100 / (x[0] * unit_scale);
3030
// scale = 100 / x[0];
3131
// scale = 100 / x[x.length - 1];
3232
return x.map(xi => scale * xi);
@@ -50,7 +50,7 @@ function plot_latency_chart(data, unit_scale, y_label) {
5050
var layout = {
5151
margin: {b: 40, t: 20},
5252
hovermode: 'closest',
53-
yaxis: {title: y_label, type: 'log'},
53+
yaxis: {title: y_label},
5454
legend: {"orientation": "h"}
5555
}
5656
Plotly.plot(chart, series, layout);
@@ -69,7 +69,7 @@ function plot_chart(data, chart_key, unit_scale, y_label) {
6969
var layout = {
7070
margin: {b: 40, t: 20},
7171
hovermode: 'closest',
72-
yaxis: {title: y_label, type: 'log'},
72+
yaxis: {title: y_label},
7373
legend: {"orientation": "h"}
7474
}
7575
Plotly.plot(chart, series, layout);
@@ -109,11 +109,11 @@ function plot_summary_chart(data, series_info) {
109109
return
110110
});
111111
load_json("data.json", function (data) {
112-
charts.push(plot_latency_chart(data, 1e9, "Wall time (seconds)"));
113-
charts.push(plot_chart(data, 'time_min', 1e9, "Wall time (seconds)"));
114-
charts.push(plot_chart(data, 'gc_min', 1e9, "Wall time (seconds)"));
112+
charts.push(plot_latency_chart(data, 1, "Wall time"));
113+
charts.push(plot_chart(data, 'time_min', 1, "Wall time (seconds)"));
114+
charts.push(plot_chart(data, 'gc_min', 1, "Wall time (seconds)"));
115115
charts.push(plot_chart(data, 'allocs', 1, "Total allocations"));
116-
charts.push(plot_chart(data, 'memory', 1024 * 1024, "Memory allocated (MiB)"));
116+
charts.push(plot_chart(data, 'memory', 1, "Memory allocated (MiB)"));
117117
return
118118
});
119119
/* =========================================================================

docs/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
Copyright (c) 2022: jump-dev/benchmarks contributors
33
44
Use of this source code is governed by an MIT-style license that can be found
@@ -47,11 +47,13 @@ <h2>Performance benchmarks</h2>
4747
<li><a href="#chart_micro_allocs">Number of allocations</a></li>
4848
<li><a href="#chart_micro_memory">Memory allocated</a></li>
4949
</ol>
50+
<p class="small-text">
51+
All plots are normalized to 100 on the oldest benchmark run.
52+
</p>
5053
<div class="divider"></div>
5154
<h4>Normalized metrics</h4>
5255
<p class="small-text">
53-
A plot of each metric, averaged across all benchmarks and
54-
normalized to 100 on the oldest benchmark run. This lets us
56+
A plot of each metric, averaged across all benchmarks. This lets us
5557
track overall trends across time.
5658
</p>
5759
<div id="chart_summary"></div>

0 commit comments

Comments
 (0)