File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed
compare/compile/table/shortcuts Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import {CompileTestCase} from "../../common";
88import {ArtifactDescription } from " ../../../types" ;
99import Tooltip from " ../../../tooltip.vue" ;
1010import {normalizeProfile } from " ./utils" ;
11+ import {cargo_collector_command } from " ../../../../../utils/cargo" ;
1112
1213const props = defineProps <{
1314 artifact: ArtifactDescription ;
@@ -30,13 +31,12 @@ function normalizeBackend(backend: string): string {
3031 Command for analyzing binary size locally
3132 <Tooltip >
3233 Execute this command in a checkout of
33- <a href =" https://github.com/rust-lang/rustc-perf" >rustc-perf</a >, after a
34- `cargo build --release`, to compare binary section sizes. Add `--symbols`
35- to include a diff of symbol sizes.
34+ <a href =" https://github.com/rust-lang/rustc-perf" >rustc-perf</a >. Add
35+ `--symbols` to include a diff of symbol sizes.
3636 </Tooltip >
3737 </div >
3838
39- <pre ><code >cargo run --release --bin collector \
39+ <pre ><code >{{ cargo_collector_command() }} \
4040 binary_stats compile \
4141 +{{ props.baseArtifact.commit }} \
4242 --rustc2 +{{ props.artifact.commit }} \
Original file line number Diff line number Diff line change 66import {CompileTestCase } from " ../../common" ;
77import {computed } from " vue" ;
88import {normalizeProfile } from " ./utils" ;
9+ import {cargo_collector_command } from " ../../../../../utils/cargo" ;
910
1011const props = defineProps <{
1112 commit: string ;
@@ -36,7 +37,7 @@ function normalizeScenario(scenario: string): string {
3637 </script >
3738
3839<template >
39- <pre ><code >cargo run --release --bin collector \
40+ <pre ><code >{{ cargo_collector_command() }} \
4041 profile_local cachegrind \
4142 +{{ firstCommit }} \<template v-if =" props .baselineCommit !== undefined " >
4243 --rustc2 +{{ props.commit }} \</template >
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ const profileBaselineCommit = computed(() => {
4949 Command for profiling locally
5050 <Tooltip >
5151 Execute this command in a checkout of
52- <a href =" https://github.com/rust-lang/rustc-perf" >rustc-perf</a >, after a
53- `cargo build --release`, to generate a Cachegrind profile.
52+ <a href =" https://github.com/rust-lang/rustc-perf" >rustc-perf</a > to
53+ generate a Cachegrind profile.
5454 </Tooltip >
5555 </div >
5656
Original file line number Diff line number Diff line change 22 chromeProfileUrl ,
33 processedSelfProfileRelativeUrl ,
44} from "../../self-profile" ;
5+ import { cargo_collector_command } from "../../utils/cargo" ;
56
67export interface Selector {
78 commit : string ;
@@ -198,23 +199,23 @@ export function createDownloadLinksData(selector: Selector | null): {
198199
199200 const localCommands = {
200201 base : state . base_commit
201- ? `cargo run --release --bin collector profile_local cachegrind
202+ ? `${ cargo_collector_command ( ) } profile_local cachegrind
202203 +${ state . base_commit } --exact-match ${ benchName (
203204 state . benchmark
204205 ) } --profiles
205206 ${ profile ( state . benchmark ) } --scenarios ${ scenarioFilter (
206207 state . scenario
207208 ) } `
208209 : "" ,
209- new : `cargo run --release --bin collector profile_local cachegrind
210+ new : `${ cargo_collector_command ( ) } profile_local cachegrind
210211 +${ state . commit } --exact-match ${ benchName (
211212 state . benchmark
212213 ) } --profiles
213214 ${ profile ( state . benchmark ) } --scenarios ${ scenarioFilter (
214215 state . scenario
215216 ) } `,
216217 diff : state . base_commit
217- ? `cargo run --release --bin collector profile_local cachegrind
218+ ? `${ cargo_collector_command ( ) } profile_local cachegrind
218219 +${ state . base_commit } --rustc2 +${
219220 state . commit
220221 } --exact-match ${ benchName ( state . benchmark ) } --profiles
Original file line number Diff line number Diff line change 1+ /**
2+ * Return a Cargo command that builds rustc-perf properly and then executes
3+ * the collector.
4+ * The returned command is meant to be followed by a `collector` command and its
5+ * arguments.
6+ */
7+ export function cargo_collector_command ( ) : string {
8+ return "cargo build --release -p collector && ./target/release/collector" ;
9+ }
You can’t perform that action at this time.
0 commit comments