generated from creek-service/single-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split benchmarks into separate build jobs & increase fork count. (#75)
To balance the recent reduction in threads used in benchmarking, the fork count needs to be increased. This will increase the time it takes each benchmark to complete. GitHub currently has a 6-hour limit per-job, which would be breached if the fork count was increased. Therefore, this change splits the benchmark job in two. One job per benchmark.
- Loading branch information
1 parent
32a5235
commit 92d1e2f
Showing
6 changed files
with
153 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,33 +58,7 @@ The graphs below exclude the `Snow` implementation, as it is orders of magnitude | |
(The `Snow` implementation describes itself as a _reference_ implementation). | ||
{: .notice--warning} | ||
|
||
<div> | ||
<canvas id="validateChart_Draft_04"></canvas> | ||
</div> | ||
|
||
| ||
|
||
<div> | ||
<canvas id="validateChart_Draft_06"></canvas> | ||
</div> | ||
|
||
| ||
|
||
<div> | ||
<canvas id="validateChart_Draft_07"></canvas> | ||
</div> | ||
|
||
| ||
|
||
<div> | ||
<canvas id="validateChart_Draft_2019_09"></canvas> | ||
</div> | ||
|
||
| ||
|
||
<div> | ||
<canvas id="validateChart_Draft_2020_12"></canvas> | ||
</div> | ||
<div id="ValidateCharts"></div> | ||
|
||
### Serde benchmark | ||
|
||
|
@@ -115,15 +89,7 @@ Newer schema versions are more feature rich, and this can come at a cost. | |
Comparison of different implementations across specification versions may be misleading. | ||
{: .notice--warning} | ||
|
||
<div> | ||
<canvas id="serdeChart_Draft_07"></canvas> | ||
</div> | ||
|
||
| ||
|
||
<div> | ||
<canvas id="serdeChart_Draft_2020_12"></canvas> | ||
</div> | ||
<div id="SerdeCharts"></div> | ||
|
||
[//]: # (Chart scripts: https://www.chartjs.org/docs/latest/) | ||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | ||
|
@@ -132,24 +98,28 @@ Comparison of different implementations across specification versions may be mis | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css" rel="stylesheet" type="text/css"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]" type="text/javascript"></script> | ||
|
||
[//]: # (IMPLEMENTATIONS_JSON, PERFORMANCE_JSON) | ||
<script> | ||
const implData = {% include implementations.json %}; | ||
|
||
const performanceData = {% include benchmark_results.json %}; | ||
const validateResults = {% include JsonValidateBenchmark.json %}; | ||
const serdeResults = {% include JsonSerdeBenchmark.json %}; | ||
|
||
function buildCharts(benchmarkName, title, elementIdPrefix, drafts, includeSnow){ | ||
let results = performanceData | ||
.filter(r => r.benchmark.includes(benchmarkName)) | ||
.filter(r => includeSnow || !r.benchmark.includes('_Snow')); | ||
function buildCharts(resultData, benchmarkType, drafts){ | ||
const chartContainer = document.getElementById(benchmarkType + 'Charts'); | ||
|
||
drafts.forEach(function(draft) { | ||
let draftData = results.filter(r => r.benchmark.includes(draft)).sort(function(a, b) { | ||
const title = document.createElement('h4'); | ||
const canvas = document.createElement('canvas'); | ||
title.textContent = draft + ' Results'; | ||
chartContainer.append(title); | ||
chartContainer.append(canvas); | ||
|
||
let draftData = resultData.filter(r => r.benchmark.includes(draft)).sort(function(a, b) { | ||
return a.primaryMetric.score - b.primaryMetric.score; | ||
}); | ||
|
||
let implNames = draftData.map(r => r.benchmark.substring(r.benchmark.lastIndexOf('_') + 1)); | ||
new Chart(document.getElementById(elementIdPrefix + draft), | ||
new Chart(canvas, | ||
{ | ||
type: 'bar', | ||
data: { | ||
|
@@ -165,7 +135,7 @@ Comparison of different implementations across specification versions may be mis | |
plugins: { | ||
title: { | ||
display: true, | ||
text: draft + ' ' + title + ' (lower is better)' | ||
text: draft + ' ' + benchmarkType + ' Performance (lower is better)' | ||
}, | ||
legend: { | ||
display: false | ||
|
@@ -183,10 +153,10 @@ Comparison of different implementations across specification versions may be mis | |
}, | ||
}); | ||
}); | ||
} | ||
} | ||
|
||
buildCharts('JsonValidateBenchmark', 'Validator Performance', 'validateChart_', ["Draft_04", "Draft_06", "Draft_07", "Draft_2019_09", "Draft_2020_12"], false); | ||
buildCharts('JsonSerdeBenchmark', 'Serde Performance', 'serdeChart_', ["Draft_07", "Draft_2020_12"], true); | ||
buildCharts(validateResults, 'Validate', ["Draft_04", "Draft_06", "Draft_07", "Draft_2019_09", "Draft_2020_12"]); | ||
buildCharts(serdeResults.filter(r => !r.benchmark.includes('_Snow')), 'Serde', ["Draft_07", "Draft_2020_12"]); | ||
</script> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters