Skip to content

Commit abe1c88

Browse files
committed
Fix table diff versioned information
1 parent 37d8696 commit abe1c88

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

backend/app/routers/benchmarks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ async def get_batch_benchmark_trends(
197197
results = {}
198198

199199
for trend_query in request.trend_queries:
200-
key = f"{trend_query.binary_id}:{trend_query.benchmark_name}"
200+
key = f"{trend_query.binary_id}:{trend_query.benchmark_name}|{trend_query.python_major}.{trend_query.python_minor}"
201201
trends = await crud.get_benchmark_trends(
202202
db,
203203
benchmark_name=trend_query.benchmark_name,

frontend/src/app/build-comparison/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ export default function BuildComparisonPage() {
274274
const newTrendData: Record<string, Record<string, TrendDataPoint[]>> = {};
275275

276276
for (const [key, trends] of Object.entries(batchResponse.results)) {
277-
const [binaryId, benchmarkName] = key.split(':');
277+
// Extract binary ID and benchmark name from key: format is "binaryId:benchmarkName|pythonVersion"
278+
let benchmarkPart = key.split('|')[0]; // Remove python version part
279+
const [binaryId, benchmarkName] = benchmarkPart.split(':'); // Extract binary ID and benchmark name
278280
if (!newTrendData[binaryId]) {
279281
newTrendData[binaryId] = {};
280282
}

frontend/src/app/trends/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ export default function BenchmarkTrendPage() {
309309
const newTrendData: Record<string, TrendDataPoint[]> = {};
310310

311311
for (const [key, trends] of Object.entries(batchResponse.results)) {
312-
const [, benchmarkName] = key.split(':');
312+
// Extract benchmark name from key: format is "binaryId:benchmarkName|pythonVersion"
313+
let benchmarkPart = key.split('|')[0]; // Remove python version part
314+
const [, benchmarkName] = benchmarkPart.split(':'); // Extract benchmark name
313315
newTrendData[benchmarkName] = trends;
314316
}
315317

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy