Skip to content

Commit 46198ae

Browse files
authored
Merge pull request #2391 from Kobzol/history-graph
Consider codegen backend in graphs page
2 parents ee22a4f + 8b333af commit 46198ae

File tree

8 files changed

+16
-10
lines changed

8 files changed

+16
-10
lines changed

site/frontend/src/graph/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export async function loadGraphs(
1313
benchmark: selector.benchmark,
1414
scenario: selector.scenario,
1515
profile: selector.profile,
16+
backend: selector.backend,
1617
target: selector.target,
1718
};
1819
return await getJson<CompileGraphData>(GRAPH_DATA_URL, params);

site/frontend/src/graph/data.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export interface GraphsSelector {
99
benchmark: string | null;
1010
scenario: string | null;
1111
profile: string | null;
12-
target: string;
12+
backend: string | null;
13+
target: string | null;
1314
}
1415

1516
export interface Series {

site/frontend/src/pages/compare/compile/table/benchmark-detail-graph.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ async function renderGraphs(detail: CompileDetailGraphs) {
7979
start: selector.start,
8080
end: selector.end,
8181
target: selector.target,
82+
backend: selector.backend,
8283
kind,
8384
};
8485

site/frontend/src/pages/compare/compile/table/benchmark-detail.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function graphLink(
7070
// Move to `30 days ago` to display history of the test case
7171
const start = formatDate(getPastDate(new Date(commit.date), 30));
7272
const end = commit.commit;
73-
const {benchmark, profile, scenario} = testCase;
74-
return `/index.html?start=${start}&end=${end}&benchmark=${benchmark}&profile=${profile}&scenario=${scenario}&stat=${metric}`;
73+
const {benchmark, profile, scenario, target, backend} = testCase;
74+
return `/index.html?start=${start}&end=${end}&benchmark=${benchmark}&profile=${profile}&scenario=${scenario}&target=${target}&backend=${backend}&stat=${metric}`;
7575
}
7676
7777
const metadata = computed(

site/frontend/src/pages/compare/runtime/benchmark-detail-graph.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ async function renderGraphs(detail: RuntimeDetailGraphs) {
6767
profile: null,
6868
scenario: null,
6969
target: selector.target,
70+
backend: null,
7071
kind,
7172
};
7273

site/frontend/src/pages/graphs/page.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ import {
99
navigateToUrlParams,
1010
} from "../../utils/navigation";
1111
import {renderPlots} from "../../graph/render";
12-
import {
13-
BenchmarkInfo,
14-
loadBenchmarkInfo,
15-
DEFAULT_COMPILE_TARGET_TRIPLE,
16-
} from "../../api";
12+
import {BenchmarkInfo, loadBenchmarkInfo} from "../../api";
1713
import {loadGraphs} from "../../graph/api";
1814
1915
function loadSelectorFromUrl(urlParams: Dict<string>): GraphsSelector {
@@ -24,7 +20,8 @@ function loadSelectorFromUrl(urlParams: Dict<string>): GraphsSelector {
2420
const benchmark = urlParams["benchmark"] ?? null;
2521
const scenario = urlParams["scenario"] ?? null;
2622
const profile = urlParams["profile"] ?? null;
27-
const target = urlParams["target"] ?? DEFAULT_COMPILE_TARGET_TRIPLE;
23+
const target = urlParams["target"] ?? null;
24+
const backend = urlParams["backend"] ?? null;
2825
return {
2926
start,
3027
end,
@@ -33,6 +30,7 @@ function loadSelectorFromUrl(urlParams: Dict<string>): GraphsSelector {
3330
benchmark,
3431
scenario,
3532
profile,
33+
backend,
3634
target,
3735
};
3836
}

site/src/api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ pub mod graphs {
119119
pub benchmark: Option<String>,
120120
pub scenario: Option<String>,
121121
pub profile: Option<String>,
122+
pub backend: Option<String>,
122123
pub target: Option<String>,
123124
}
124125

site/src/request_handlers/graph.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ pub async fn handle_graphs(
206206
benchmark: None,
207207
scenario: None,
208208
profile: None,
209+
backend: None,
209210
target: None,
210211
};
211212

@@ -250,14 +251,16 @@ async fn create_graphs(
250251
let scenario_selector = create_selector(&request.scenario).unwrap_or(Ok(Selector::All))?;
251252
let target_selector = create_selector(&request.target)
252253
.unwrap_or(Ok(Selector::One(Target::X86_64UnknownLinuxGnu)))?;
254+
let backend_selector =
255+
create_selector(&request.backend).unwrap_or(Ok(Selector::One(CodegenBackend::Llvm)))?;
253256

254257
let interpolated_responses: Vec<_> = ctxt
255258
.statistic_series(
256259
CompileBenchmarkQuery::default()
257260
.benchmark(benchmark_selector)
258261
.profile(profile_selector)
259262
.scenario(scenario_selector)
260-
.backend(Selector::One(CodegenBackend::Llvm))
263+
.backend(backend_selector)
261264
.target(target_selector)
262265
.metric(Selector::One(request.stat.parse()?)),
263266
artifact_ids.clone(),

0 commit comments

Comments
 (0)