Skip to content

Commit 058080e

Browse files
committed
Use --exact-match instead of --include on the website
The example commands always execute a single benchmark, so they should match its name exactly.
1 parent 6a70166 commit 058080e

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

site/frontend/src/pages/compare/compile/table/shortcuts/binary-size-shortcut.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function normalizeBackend(backend: string): string {
3939
<pre><code>./target/release/collector binary_stats compile \
4040
+{{ props.baseArtifact.commit }} \
4141
--rustc2 +{{ props.artifact.commit }} \
42-
--include {{ testCase.benchmark }} \
42+
--exact-match {{ testCase.benchmark }} \
4343
--profile {{ normalizeProfile(testCase.profile) }} \
4444
--backend {{ normalizeBackend(testCase.backend) }}</code></pre>
4545
</template>

site/frontend/src/pages/compare/compile/table/shortcuts/cachegrind-cmd.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function normalizeScenario(scenario: string): string {
3939
<pre><code>./target/release/collector profile_local cachegrind \
4040
+{{ firstCommit }} \<template v-if="props.baselineCommit !== undefined">
4141
--rustc2 +{{ props.commit }} \</template>
42-
--include {{ testCase.benchmark }} \
42+
--exact-match {{ testCase.benchmark }} \
4343
--profiles {{ normalizeProfile(testCase.profile) }} \
4444
--scenarios {{ normalizeScenario(testCase.scenario) }}</code></pre>
4545
</template>

site/frontend/src/pages/detailed-query.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {postMsgpack} from "../utils/requests";
33
import {SELF_PROFILE_DATA_URL} from "../urls";
44
import {
55
chromeProfileUrl,
6-
processedSelfProfileRelativeUrl,
6+
processedSelfProfileRelativeUrl
77
} from "../self-profile";
88
import {openTraceInPerfetto} from "../perfetto";
99

@@ -173,23 +173,23 @@ function populate_data(data, state: Selector) {
173173
b.endsWith("-opt")
174174
? "Opt"
175175
: b.endsWith("-doc")
176-
? "Doc"
177-
: b.endsWith("-debug")
178-
? "Debug"
179-
: b.endsWith("-check")
180-
? "Check"
181-
: "???";
176+
? "Doc"
177+
: b.endsWith("-debug")
178+
? "Debug"
179+
: b.endsWith("-check")
180+
? "Check"
181+
: "???";
182182
let bench_name = (b) => b.replace(/-[^-]*$/, "");
183183
let scenario_filter = (s) =>
184184
s == "full"
185185
? "Full"
186186
: s == "incr-full"
187-
? "IncrFull"
188-
: s == "incr-unchanged"
189-
? "IncrUnchanged"
190-
: s.startsWith("incr-patched")
191-
? "IncrPatched"
192-
: "???";
187+
? "IncrFull"
188+
: s == "incr-unchanged"
189+
? "IncrUnchanged"
190+
: s.startsWith("incr-patched")
191+
? "IncrPatched"
192+
: "???";
193193
if (state.base_commit) {
194194
txt += "<br>";
195195
txt += `Diff: <a
@@ -198,7 +198,7 @@ function populate_data(data, state: Selector) {
198198
txt +=
199199
"<br>Local profile (base): <code>" +
200200
`./target/release/collector profile_local cachegrind
201-
+${state.base_commit} --include ${bench_name(
201+
+${state.base_commit} --exact-match ${bench_name(
202202
state.benchmark
203203
)} --profiles
204204
${profile(state.benchmark)} --scenarios ${scenario_filter(
@@ -208,7 +208,7 @@ function populate_data(data, state: Selector) {
208208
txt +=
209209
"<br>Local profile (new): <code>" +
210210
`./target/release/collector profile_local cachegrind
211-
+${state.commit} --include ${bench_name(
211+
+${state.commit} --exact-match ${bench_name(
212212
state.benchmark
213213
)} --profiles
214214
${profile(state.benchmark)} --scenarios ${scenario_filter(
@@ -220,7 +220,7 @@ function populate_data(data, state: Selector) {
220220
`./target/release/collector profile_local cachegrind
221221
+${state.base_commit} --rustc2 +${
222222
state.commit
223-
} --include ${bench_name(state.benchmark)} --profiles
223+
} --exact-match ${bench_name(state.benchmark)} --profiles
224224
${profile(state.benchmark)} --scenarios ${scenario_filter(
225225
state.scenario
226226
)}</code>`;
@@ -395,7 +395,7 @@ function to_object(element) {
395395
element.number_of_cache_hits,
396396
element.invocation_count,
397397
element.blocked_time,
398-
element.incremental_load_time,
398+
element.incremental_load_time
399399
];
400400
}
401401
let [
@@ -406,14 +406,14 @@ function to_object(element) {
406406
_cache_hits,
407407
invocation_count,
408408
_blocked_time,
409-
incremental_load_time,
409+
incremental_load_time
410410
] = element;
411411
return {
412412
label,
413413
self_time,
414414
percent_total_time,
415415
invocation_count,
416-
incremental_load_time,
416+
incremental_load_time
417417
};
418418
}
419419

@@ -433,7 +433,7 @@ async function loadData() {
433433
base_commit: base_commit ?? null,
434434
benchmark,
435435
scenario,
436-
sort_idx: sort_idx ?? "-2",
436+
sort_idx: sort_idx ?? "-2"
437437
};
438438

439439
const response = await postMsgpack(SELF_PROFILE_DATA_URL, selector);

0 commit comments

Comments
 (0)