mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-10-12 00:45:16 +00:00
add Benchmark (go) benchmark result for cbfb16aebd
This commit is contained in:
@@ -0,0 +1,224 @@
|
|||||||
|
window.BENCHMARK_DATA = {
|
||||||
|
"lastUpdate": 1790944388551,
|
||||||
|
"repoUrl": "https://github.com/lukaszraczylo/gohoarder",
|
||||||
|
"entries": {
|
||||||
|
"Benchmark": [
|
||||||
|
{
|
||||||
|
"commit": {
|
||||||
|
"author": {
|
||||||
|
"email": "49699333+dependabot[bot]@users.noreply.github.com",
|
||||||
|
"name": "dependabot[bot]",
|
||||||
|
"username": "dependabot[bot]"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "[email protected]",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "cbfb16aebd2e1b34e3ef50faf241ae4123ffab20",
|
||||||
|
"message": "chore(deps): bump the go_modules group across 1 directory with 3 updates (#129)\n\nBumps the go_modules group with 3 updates in the / directory: [github.com/moby/go-archive](https://github.com/moby/go-archive), [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) and [google.golang.org/grpc](https://github.com/grpc/grpc-go).\n\n\nUpdates `github.com/moby/go-archive` from 0.2.0 to 0.3.0\n- [Release notes](https://github.com/moby/go-archive/releases)\n- [Changelog](https://github.com/moby/go-archive/blob/main/changes_test.go)\n- [Commits](https://github.com/moby/go-archive/compare/v0.2.0...v0.3.0)\n\nUpdates `go.opentelemetry.io/otel` from 1.39.0 to 1.41.0\n- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)\n- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)\n- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.39.0...v1.41.0)\n\nUpdates `google.golang.org/grpc` from 1.79.3 to 1.83.2\n- [Release notes](https://github.com/grpc/grpc-go/releases)\n- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.83.2)\n\n---\nupdated-dependencies:\n- dependency-name: github.com/moby/go-archive\n dependency-version: 0.3.0\n dependency-type: indirect\n- dependency-name: go.opentelemetry.io/otel\n dependency-version: 1.41.0\n dependency-type: indirect\n- dependency-name: google.golang.org/grpc\n dependency-version: 1.83.1\n dependency-type: indirect\n...\n\nSigned-off-by: dependabot[bot] <[email protected]>\nCo-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",
|
||||||
|
"timestamp": "2026-10-02T13:14:41+01:00",
|
||||||
|
"tree_id": "7712f68dbd6b65447325222af7f91b5fcdbee167",
|
||||||
|
"url": "https://github.com/lukaszraczylo/gohoarder/commit/cbfb16aebd2e1b34e3ef50faf241ae4123ffab20"
|
||||||
|
},
|
||||||
|
"date": 1790944388150,
|
||||||
|
"tool": "go",
|
||||||
|
"benches": [
|
||||||
|
{
|
||||||
|
"name": "BenchmarkDefault (github.com/lukaszraczylo/gohoarder/pkg/config)",
|
||||||
|
"value": 404.5,
|
||||||
|
"unit": "ns/op\t 1664 B/op\t 3 allocs/op",
|
||||||
|
"extra": "2842394 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkDefault (github.com/lukaszraczylo/gohoarder/pkg/config) - ns/op",
|
||||||
|
"value": 404.5,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "2842394 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkDefault (github.com/lukaszraczylo/gohoarder/pkg/config) - B/op",
|
||||||
|
"value": 1664,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "2842394 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkDefault (github.com/lukaszraczylo/gohoarder/pkg/config) - allocs/op",
|
||||||
|
"value": 3,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "2842394 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkValidate (github.com/lukaszraczylo/gohoarder/pkg/config)",
|
||||||
|
"value": 387,
|
||||||
|
"unit": "ns/op\t 0 B/op\t 0 allocs/op",
|
||||||
|
"extra": "3109815 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkValidate (github.com/lukaszraczylo/gohoarder/pkg/config) - ns/op",
|
||||||
|
"value": 387,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "3109815 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkValidate (github.com/lukaszraczylo/gohoarder/pkg/config) - B/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "3109815 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkValidate (github.com/lukaszraczylo/gohoarder/pkg/config) - allocs/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "3109815 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewError (github.com/lukaszraczylo/gohoarder/pkg/errors)",
|
||||||
|
"value": 0.3178,
|
||||||
|
"unit": "ns/op\t 0 B/op\t 0 allocs/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewError (github.com/lukaszraczylo/gohoarder/pkg/errors) - ns/op",
|
||||||
|
"value": 0.3178,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewError (github.com/lukaszraczylo/gohoarder/pkg/errors) - B/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewError (github.com/lukaszraczylo/gohoarder/pkg/errors) - allocs/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewErrorWithDetails (github.com/lukaszraczylo/gohoarder/pkg/errors)",
|
||||||
|
"value": 0.3211,
|
||||||
|
"unit": "ns/op\t 0 B/op\t 0 allocs/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewErrorWithDetails (github.com/lukaszraczylo/gohoarder/pkg/errors) - ns/op",
|
||||||
|
"value": 0.3211,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewErrorWithDetails (github.com/lukaszraczylo/gohoarder/pkg/errors) - B/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNewErrorWithDetails (github.com/lukaszraczylo/gohoarder/pkg/errors) - allocs/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "1000000000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemPut (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem)",
|
||||||
|
"value": 116213,
|
||||||
|
"unit": "ns/op\t 2515 B/op\t 35 allocs/op",
|
||||||
|
"extra": "10000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemPut (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - ns/op",
|
||||||
|
"value": 116213,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "10000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemPut (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - B/op",
|
||||||
|
"value": 2515,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "10000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemPut (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - allocs/op",
|
||||||
|
"value": 35,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "10000 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemGet (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem)",
|
||||||
|
"value": 9597,
|
||||||
|
"unit": "ns/op\t 2376 B/op\t 8 allocs/op",
|
||||||
|
"extra": "123232 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemGet (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - ns/op",
|
||||||
|
"value": 9597,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "123232 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemGet (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - B/op",
|
||||||
|
"value": 2376,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "123232 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkFilesystemGet (github.com/lukaszraczylo/gohoarder/pkg/storage/filesystem) - allocs/op",
|
||||||
|
"value": 8,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "123232 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNew (github.com/lukaszraczylo/gohoarder/pkg/uuid)",
|
||||||
|
"value": 68.73,
|
||||||
|
"unit": "ns/op\t 0 B/op\t 0 allocs/op",
|
||||||
|
"extra": "17315691 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNew (github.com/lukaszraczylo/gohoarder/pkg/uuid) - ns/op",
|
||||||
|
"value": 68.73,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "17315691 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNew (github.com/lukaszraczylo/gohoarder/pkg/uuid) - B/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "17315691 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkNew (github.com/lukaszraczylo/gohoarder/pkg/uuid) - allocs/op",
|
||||||
|
"value": 0,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "17315691 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkString (github.com/lukaszraczylo/gohoarder/pkg/uuid)",
|
||||||
|
"value": 336.7,
|
||||||
|
"unit": "ns/op\t 184 B/op\t 7 allocs/op",
|
||||||
|
"extra": "3606226 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkString (github.com/lukaszraczylo/gohoarder/pkg/uuid) - ns/op",
|
||||||
|
"value": 336.7,
|
||||||
|
"unit": "ns/op",
|
||||||
|
"extra": "3606226 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkString (github.com/lukaszraczylo/gohoarder/pkg/uuid) - B/op",
|
||||||
|
"value": 184,
|
||||||
|
"unit": "B/op",
|
||||||
|
"extra": "3606226 times\n4 procs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BenchmarkString (github.com/lukaszraczylo/gohoarder/pkg/uuid) - allocs/op",
|
||||||
|
"value": 7,
|
||||||
|
"unit": "allocs/op",
|
||||||
|
"extra": "3606226 times\n4 procs"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,281 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes" />
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
font-family: BlinkMacSystemFont,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
color: #4a4a4a;
|
||||||
|
margin: 8px;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #3273dc;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #3298dc;
|
||||||
|
border-color: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
background-color: #2793da;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
.spacer {
|
||||||
|
flex: auto;
|
||||||
|
}
|
||||||
|
.small {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
margin-top: 16px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.header-label {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.benchmark-set {
|
||||||
|
margin: 8px 0;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.benchmark-title {
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 600;
|
||||||
|
word-break: break-word;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.benchmark-graphs {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.benchmark-chart {
|
||||||
|
max-width: 1000px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<title>Benchmarks</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header id="header">
|
||||||
|
<div class="header-item">
|
||||||
|
<strong class="header-label">Last Update:</strong>
|
||||||
|
<span id="last-update"></span>
|
||||||
|
</div>
|
||||||
|
<div class="header-item">
|
||||||
|
<strong class="header-label">Repository:</strong>
|
||||||
|
<a id="repository-link" rel="noopener"></a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<main id="main"></main>
|
||||||
|
<footer>
|
||||||
|
<button id="dl-button">Download data as JSON</button>
|
||||||
|
<div class="spacer"></div>
|
||||||
|
<div class="small">Powered by <a rel="noopener" href="https://github.com/marketplace/actions/continuous-benchmark">github-action-benchmark</a></div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js"></script>
|
||||||
|
<script src="data.js"></script>
|
||||||
|
<script id="main-script">
|
||||||
|
'use strict';
|
||||||
|
(function() {
|
||||||
|
// Colors from https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
|
||||||
|
const toolColors = {
|
||||||
|
cargo: '#dea584',
|
||||||
|
go: '#00add8',
|
||||||
|
benchmarkjs: '#f1e05a',
|
||||||
|
benchmarkluau: '#000080',
|
||||||
|
pytest: '#3572a5',
|
||||||
|
googlecpp: '#f34b7d',
|
||||||
|
catch2: '#f34b7d',
|
||||||
|
julia: '#a270ba',
|
||||||
|
jmh: '#b07219',
|
||||||
|
benchmarkdotnet: '#178600',
|
||||||
|
customBiggerIsBetter: '#38ff38',
|
||||||
|
customSmallerIsBetter: '#ff3838',
|
||||||
|
_: '#333333'
|
||||||
|
};
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
function collectBenchesPerTestCase(entries) {
|
||||||
|
const map = new Map();
|
||||||
|
for (const entry of entries) {
|
||||||
|
const {commit, date, tool, benches} = entry;
|
||||||
|
for (const bench of benches) {
|
||||||
|
const result = { commit, date, tool, bench };
|
||||||
|
const arr = map.get(bench.name);
|
||||||
|
if (arr === undefined) {
|
||||||
|
map.set(bench.name, [result]);
|
||||||
|
} else {
|
||||||
|
arr.push(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = window.BENCHMARK_DATA;
|
||||||
|
|
||||||
|
// Render header
|
||||||
|
document.getElementById('last-update').textContent = new Date(data.lastUpdate).toString();
|
||||||
|
const repoLink = document.getElementById('repository-link');
|
||||||
|
repoLink.href = data.repoUrl;
|
||||||
|
repoLink.textContent = data.repoUrl;
|
||||||
|
|
||||||
|
// Render footer
|
||||||
|
document.getElementById('dl-button').onclick = () => {
|
||||||
|
const dataUrl = 'data:,' + JSON.stringify(data, null, 2);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = dataUrl;
|
||||||
|
a.download = 'benchmark_data.json';
|
||||||
|
a.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Prepare data points for charts
|
||||||
|
return Object.keys(data.entries).map(name => ({
|
||||||
|
name,
|
||||||
|
dataSet: collectBenchesPerTestCase(data.entries[name]),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderAllChars(dataSets) {
|
||||||
|
|
||||||
|
function renderGraph(parent, name, dataset) {
|
||||||
|
const canvas = document.createElement('canvas');
|
||||||
|
canvas.className = 'benchmark-chart';
|
||||||
|
parent.appendChild(canvas);
|
||||||
|
|
||||||
|
const color = toolColors[dataset.length > 0 ? dataset[0].tool : '_'];
|
||||||
|
const data = {
|
||||||
|
labels: dataset.map(d => d.commit.id.slice(0, 7)),
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: name,
|
||||||
|
data: dataset.map(d => d.bench.value),
|
||||||
|
borderColor: color,
|
||||||
|
backgroundColor: color + '60', // Add alpha for #rrggbbaa
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const options = {
|
||||||
|
scales: {
|
||||||
|
xAxes: [
|
||||||
|
{
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'commit',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxes: [
|
||||||
|
{
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: dataset.length > 0 ? dataset[0].bench.unit : '',
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
callbacks: {
|
||||||
|
afterTitle: items => {
|
||||||
|
const {index} = items[0];
|
||||||
|
const data = dataset[index];
|
||||||
|
return '\n' + data.commit.message + '\n\n' + data.commit.timestamp + ' committed by @' + data.commit.committer.username + '\n';
|
||||||
|
},
|
||||||
|
label: item => {
|
||||||
|
let label = item.value;
|
||||||
|
const { range, unit } = dataset[item.index].bench;
|
||||||
|
label += ' ' + unit;
|
||||||
|
if (range) {
|
||||||
|
label += ' (' + range + ')';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
},
|
||||||
|
afterLabel: item => {
|
||||||
|
const { extra } = dataset[item.index].bench;
|
||||||
|
return extra ? '\n' + extra : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onClick: (_mouseEvent, activeElems) => {
|
||||||
|
if (activeElems.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// XXX: Undocumented. How can we know the index?
|
||||||
|
const index = activeElems[0]._index;
|
||||||
|
const url = dataset[index].commit.url;
|
||||||
|
window.open(url, '_blank');
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
new Chart(canvas, {
|
||||||
|
type: 'line',
|
||||||
|
data,
|
||||||
|
options,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderBenchSet(name, benchSet, main) {
|
||||||
|
const setElem = document.createElement('div');
|
||||||
|
setElem.className = 'benchmark-set';
|
||||||
|
main.appendChild(setElem);
|
||||||
|
|
||||||
|
const nameElem = document.createElement('h1');
|
||||||
|
nameElem.className = 'benchmark-title';
|
||||||
|
nameElem.textContent = name;
|
||||||
|
setElem.appendChild(nameElem);
|
||||||
|
|
||||||
|
const graphsElem = document.createElement('div');
|
||||||
|
graphsElem.className = 'benchmark-graphs';
|
||||||
|
setElem.appendChild(graphsElem);
|
||||||
|
|
||||||
|
for (const [benchName, benches] of benchSet.entries()) {
|
||||||
|
renderGraph(graphsElem, benchName, benches)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const main = document.getElementById('main');
|
||||||
|
for (const {name, dataSet} of dataSets) {
|
||||||
|
renderBenchSet(name, dataSet, main);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderAllChars(init()); // Start
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user