83 lines
5.1 KiB
HTML
83 lines
5.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<title>BenchmarkDotNet Riportok (Dropdown)</title>
|
|
<style>
|
|
body { font-family: Segoe UI, Arial, sans-serif; margin: 2em; background: #f8f9fa; }
|
|
select { font-size: 1.1em; padding: 0.2em; }
|
|
.report-content { background: #fff; border: 1px solid #ccc; padding: 1em; margin-top: 1em; border-radius: 6px; box-shadow: 0 2px 8px #0001; min-height: 200px; }
|
|
h1 { font-size: 1.5em; }
|
|
.filename { color: #888; font-size: 0.95em; }
|
|
.compare { color: #007700; font-size: 1.1em; margin-bottom: 1em; }
|
|
.compare.negative { color: #bb2222; }
|
|
iframe { width: 100%; min-height: 600px; border: none; background: #fff; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>BenchmarkDotNet Riportok</h1>
|
|
<label for='reportSelect'>Válassz riportot:</label>
|
|
<select id='reportSelect'>
|
|
<option value='AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_486670772'>AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report</option>
|
|
<option value='AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_2144380973'>SwitcherRun_20251215T194244_217</option>
|
|
<option value='AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_742792311'>SwitcherRun_20251214T182029_626</option>
|
|
<option value='AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_889027207'>AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report</option>
|
|
<option value='AyCode.Core.Benchmarks.AcBinaryVsMessagePackFullBenchmark-report_839282233'>SwitcherRun_20251214T182029_626</option>
|
|
</select>
|
|
<div class='filename' id='filename'></div>
|
|
<div class='compare' id='compare'></div>
|
|
<div class='report-content'><iframe id='reportFrame'></iframe></div>
|
|
<script>
|
|
// Relatív riport fájlok
|
|
const reports = {
|
|
'AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_486670772': 'Test_Benchmark_Results/Benchmark/results/AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report.html',
|
|
'AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_2144380973': 'Test_Benchmark_Results/MemDiag/SwitcherRun_20251215T194244_217/results/AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report.html',
|
|
'AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_742792311': 'AyCode.Benchmark/Test_Benchmark_Results/MemDiag/SwitcherRun_20251214T182029_626/results/AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report.html',
|
|
'AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_889027207': 'AyCode.Benchmark/Test_Benchmark_Results/Benchmark/results/AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report.html',
|
|
'AyCode.Core.Benchmarks.AcBinaryVsMessagePackFullBenchmark-report_839282233': 'AyCode.Benchmark/Test_Benchmark_Results/MemDiag/SwitcherRun_20251214T182029_626/results/AyCode.Core.Benchmarks.AcBinaryVsMessagePackFullBenchmark-report.html',
|
|
};
|
|
const means = {
|
|
'AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_486670772': '',
|
|
'AyCode.Core.Benchmarks.AcBinaryOptionsDeserializeBenchmark-report_2144380973': '',
|
|
'AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_742792311': '',
|
|
'AyCode.Core.Benchmarks.MessagePackComparisonBenchmark-report_889027207': '',
|
|
'AyCode.Core.Benchmarks.AcBinaryVsMessagePackFullBenchmark-report_839282233': '',
|
|
};
|
|
const select = document.getElementById('reportSelect');
|
|
const frame = document.getElementById('reportFrame');
|
|
const filename = document.getElementById('filename');
|
|
const compare = document.getElementById('compare');
|
|
function showReport() {
|
|
const id = select.value;
|
|
if (reports[id]) {
|
|
frame.src = reports[id];
|
|
} else {
|
|
frame.srcdoc = '<i>Nincs tartalom.</i>';
|
|
}
|
|
const opt = select.options[select.selectedIndex];
|
|
filename.textContent = opt ? opt.text : '';
|
|
// Összehasonlítás az eggyel korábbival
|
|
const idx = select.selectedIndex;
|
|
if (idx < select.options.length - 1) {
|
|
const prevId = select.options[idx + 1].value;
|
|
const currMean = parseFloat(means[id].replace(',','.'));
|
|
const prevMean = parseFloat(means[prevId].replace(',','.'));
|
|
if (!isNaN(currMean) && !isNaN(prevMean) && prevMean > 0) {
|
|
const diff = currMean - prevMean;
|
|
const percent = (diff / prevMean * 100).toFixed(2);
|
|
const sign = percent > 0 ? '+' : '';
|
|
compare.textContent = Eltérés az előzőhöz képest: % ( vs );
|
|
compare.className = 'compare' + (percent > 0 ? ' negative' : '');
|
|
} else {
|
|
compare.textContent = '';
|
|
}
|
|
} else {
|
|
compare.textContent = '';
|
|
}
|
|
}
|
|
select.addEventListener('change', showReport);
|
|
window.onload = showReport;
|
|
</script>
|
|
</body>
|
|
</html>
|