Skip to content

Commit 1172c14

Browse files
Copilotmrjf
andauthored
Remove Visual Comparison bar chart from benchmarks page
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/629c4cea-3c4b-4a56-9ffc-37b38af47f87 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent 9daa7eb commit 1172c14

1 file changed

Lines changed: 0 additions & 93 deletions

File tree

playground/benchmarks.html

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -77,58 +77,6 @@
7777
.ratio-badge.fast { background: rgba(63, 185, 80, 0.15); color: var(--green); }
7878
.ratio-badge.slow { background: rgba(210, 153, 34, 0.15); color: var(--orange); }
7979

80-
/* Bar chart */
81-
.bar-chart { margin: 1.5rem 0; }
82-
.bar-row {
83-
display: flex;
84-
align-items: center;
85-
margin-bottom: 0.75rem;
86-
gap: 0.75rem;
87-
}
88-
.bar-label {
89-
width: 160px;
90-
text-align: right;
91-
font-size: 0.85rem;
92-
color: #8b949e;
93-
flex-shrink: 0;
94-
}
95-
.bar-container {
96-
flex: 1;
97-
display: flex;
98-
gap: 4px;
99-
flex-direction: column;
100-
}
101-
.bar {
102-
height: 24px;
103-
border-radius: 4px;
104-
display: flex;
105-
align-items: center;
106-
padding-left: 8px;
107-
font-size: 0.75rem;
108-
font-family: var(--font-mono);
109-
min-width: 50px;
110-
transition: width 0.3s ease;
111-
}
112-
.bar.tsb { background: var(--accent); color: #0d1117; }
113-
.bar.pandas { background: var(--orange); color: #0d1117; }
114-
115-
.legend {
116-
display: flex;
117-
gap: 1.5rem;
118-
margin: 1rem 0;
119-
font-size: 0.85rem;
120-
}
121-
.legend-item {
122-
display: flex;
123-
align-items: center;
124-
gap: 0.4rem;
125-
}
126-
.legend-swatch {
127-
width: 14px;
128-
height: 14px;
129-
border-radius: 3px;
130-
}
131-
13280
.info-box {
13381
background: var(--surface);
13482
border: 1px solid var(--border);
@@ -183,17 +131,6 @@ <h1>⚡ Performance Benchmarks</h1>
183131
and the same number of iterations.
184132
</p>
185133

186-
<div class="legend">
187-
<div class="legend-item">
188-
<div class="legend-swatch" style="background: var(--accent);"></div>
189-
<span>tsb (TypeScript)</span>
190-
</div>
191-
<div class="legend-item">
192-
<div class="legend-swatch" style="background: var(--orange);"></div>
193-
<span>pandas (Python)</span>
194-
</div>
195-
</div>
196-
197134
<div id="no-data" style="display: none;">
198135
<p>📊 No benchmark data available yet.</p>
199136
<p style="font-size: 0.875rem; margin-top: 0.5rem;">
@@ -203,10 +140,6 @@ <h1>⚡ Performance Benchmarks</h1>
203140
</p>
204141
</div>
205142

206-
<!-- Chart section -->
207-
<h2 id="chart-heading" style="display: none;">Visual Comparison</h2>
208-
<div id="bar-chart" class="bar-chart"></div>
209-
210143
<!-- Table section -->
211144
<h2 id="table-heading" style="display: none;">Detailed Results</h2>
212145
<table id="bench-table" class="bench-table" style="display: none;">
@@ -258,8 +191,6 @@ <h3>🤖 About</h3>
258191
// Load benchmark results and render
259192
(async function () {
260193
const noData = document.getElementById("no-data");
261-
const chartHeading = document.getElementById("chart-heading");
262-
const barChart = document.getElementById("bar-chart");
263194
const tableHeading = document.getElementById("table-heading");
264195
const benchTable = document.getElementById("bench-table");
265196
const benchTbody = document.getElementById("bench-tbody");
@@ -289,37 +220,13 @@ <h3>🤖 About</h3>
289220
}
290221

291222
// Show sections
292-
chartHeading.style.display = "";
293223
tableHeading.style.display = "";
294224
benchTable.style.display = "";
295225
if (data.timestamp) {
296226
benchTimestamp.style.display = "";
297227
benchTimestamp.textContent = "Last updated: " + data.timestamp;
298228
}
299229

300-
// Find max time for scaling bars
301-
let maxTime = 0;
302-
for (const b of benchmarks) {
303-
maxTime = Math.max(maxTime, b.tsb.mean_ms, b.pandas.mean_ms);
304-
}
305-
306-
// Render bar chart
307-
for (const b of benchmarks) {
308-
const label = b.function.replace(/_/g, " ");
309-
const tsPct = (b.tsb.mean_ms / maxTime) * 100;
310-
const pyPct = (b.pandas.mean_ms / maxTime) * 100;
311-
312-
const row = document.createElement("div");
313-
row.className = "bar-row";
314-
row.innerHTML =
315-
'<div class="bar-label">' + label + '</div>' +
316-
'<div class="bar-container">' +
317-
'<div class="bar tsb" style="width: ' + Math.max(tsPct, 5) + '%">' + b.tsb.mean_ms + ' ms</div>' +
318-
'<div class="bar pandas" style="width: ' + Math.max(pyPct, 5) + '%">' + b.pandas.mean_ms + ' ms</div>' +
319-
'</div>';
320-
barChart.appendChild(row);
321-
}
322-
323230
// Render table
324231
for (const b of benchmarks) {
325232
const ratio = b.ratio;

0 commit comments

Comments
 (0)