@@ -13,6 +13,7 @@ import {GraphRenderOpts, renderPlots} from "../../../../graph/render";
13
13
import {GRAPH_RESOLVER } from " ../../../../graph/resolver" ;
14
14
import {GraphKind } from " ../../../../graph/data" ;
15
15
import uPlot from " uplot" ;
16
+ import CachegrindCmd from " ../../../../components/cachegrind-cmd.vue" ;
16
17
17
18
const props = defineProps <{
18
19
testCase: CompileTestCase ;
@@ -182,109 +183,145 @@ onMounted(() => renderGraph());
182
183
</script >
183
184
184
185
<template >
185
- <div class =" wrapper" >
186
- <div >
187
- <div class =" title info bold" >Benchmark info</div >
188
- <table >
189
- <tbody >
190
- <tr >
191
- <td >Benchmark</td >
192
- <td >{{ testCase.benchmark }}</td >
193
- </tr >
194
- <tr >
195
- <td >Profile</td >
196
- <td >{{ testCase.profile }}</td >
197
- </tr >
198
- <tr >
199
- <td >Scenario</td >
200
- <td >{{ testCase.scenario }}</td >
201
- </tr >
202
- <tr >
203
- <td >Category</td >
204
- <td >{{ testCase.category }}</td >
205
- </tr >
206
- <tr v-if =" (metadata?.binary ?? null) !== null" >
207
- <td >Artifact</td >
208
- <td >{{ metadata.binary ? "binary" : "library" }}</td >
209
- </tr >
210
- <tr v-if =" (metadata?.iterations ?? null) !== null" >
211
- <td >
212
- Iterations
213
- <Tooltip > How many times is the benchmark executed? </Tooltip >
214
- </td >
215
- <td >{{ metadata.iterations }}</td >
216
- </tr >
217
- <tr v-if =" (cargoProfile?.lto ?? null) !== null" >
218
- <td >LTO</td >
219
- <td >{{ cargoProfile.lto }}</td >
220
- </tr >
221
- <tr v-if =" (cargoProfile?.debug ?? null) !== null" >
222
- <td >Debuginfo</td >
223
- <td >{{ cargoProfile.debug }}</td >
224
- </tr >
225
- <tr v-if =" (cargoProfile?.codegen_units ?? null) !== null" >
226
- <td >Codegen units</td >
227
- <td >{{ cargoProfile.codegen_units }}</td >
228
- </tr >
229
- </tbody >
230
- </table >
231
- </div >
232
- <div >
233
- <div class =" title" >
234
- <div class =" bold" >{{ getGraphTitle() }}</div >
235
- <div style =" font-size : 0.8em " >
236
- Each plotted value is relative to its previous commit
186
+ <div >
187
+ <div class =" columns" >
188
+ <div class =" rows grow" >
189
+ <div >
190
+ <div class =" title info bold" >Benchmark info</div >
191
+ <table >
192
+ <tbody >
193
+ <tr >
194
+ <td >Benchmark</td >
195
+ <td >{{ testCase.benchmark }}</td >
196
+ </tr >
197
+ <tr >
198
+ <td >Profile</td >
199
+ <td >{{ testCase.profile }}</td >
200
+ </tr >
201
+ <tr >
202
+ <td >Scenario</td >
203
+ <td >{{ testCase.scenario }}</td >
204
+ </tr >
205
+ <tr >
206
+ <td >Category</td >
207
+ <td >{{ testCase.category }}</td >
208
+ </tr >
209
+ <tr v-if =" (metadata?.binary ?? null) !== null" >
210
+ <td >Artifact</td >
211
+ <td >{{ metadata.binary ? "binary" : "library" }}</td >
212
+ </tr >
213
+ <tr v-if =" (metadata?.iterations ?? null) !== null" >
214
+ <td >
215
+ Iterations
216
+ <Tooltip > How many times is the benchmark executed? </Tooltip >
217
+ </td >
218
+ <td >{{ metadata.iterations }}</td >
219
+ </tr >
220
+ <tr v-if =" (cargoProfile?.lto ?? null) !== null" >
221
+ <td >LTO</td >
222
+ <td >{{ cargoProfile.lto }}</td >
223
+ </tr >
224
+ <tr v-if =" (cargoProfile?.debug ?? null) !== null" >
225
+ <td >Debuginfo</td >
226
+ <td >{{ cargoProfile.debug }}</td >
227
+ </tr >
228
+ <tr v-if =" (cargoProfile?.codegen_units ?? null) !== null" >
229
+ <td >Codegen units</td >
230
+ <td >{{ cargoProfile.codegen_units }}</td >
231
+ </tr >
232
+ </tbody >
233
+ </table >
234
+ </div >
235
+ <div class =" links" >
236
+ <div class =" title bold" >Links</div >
237
+ <ul >
238
+ <li >
239
+ <a
240
+ :href =" graphLink(props.artifact, props.metric, props.testCase)"
241
+ target =" _blank"
242
+ >
243
+ History graph
244
+ </a >
245
+ </li >
246
+ <li >
247
+ <a
248
+ :href =" detailedQueryLink(props.artifact, props.baseArtifact)"
249
+ target =" _blank"
250
+ >
251
+ Self profile (diff)
252
+ </a >
253
+ </li >
254
+ <li >
255
+ <a :href =" detailedQueryLink(props.baseArtifact)" target =" _blank" >
256
+ Self profile (before)
257
+ </a >
258
+ </li >
259
+ <li >
260
+ <a :href =" detailedQueryLink(props.artifact)" target =" _blank" >
261
+ Self profile (after)
262
+ </a >
263
+ </li >
264
+ <li >
265
+ <a :href =" benchmarkLink(testCase.benchmark)" target =" _blank" >
266
+ Benchmark source code
267
+ </a >
268
+ </li >
269
+ </ul >
237
270
</div >
238
- <div style =" font-size : 0.8em " >
239
- The shaded region shows values that are more recent than the
240
- benchmarked commit
271
+ </div >
272
+ <div class =" rows center-items grow" >
273
+ <div class =" title" >
274
+ <div class =" bold" >{{ getGraphTitle() }}</div >
275
+ <div style =" font-size : 0.8em " >
276
+ Each plotted value is relative to its previous commit
277
+ </div >
278
+ <div style =" font-size : 0.8em " >
279
+ The shaded region shows values that are more recent than the
280
+ benchmarked commit
281
+ </div >
241
282
</div >
283
+ <div ref =" chartElement" ></div >
242
284
</div >
243
- <div ref =" chartElement" ></div >
244
285
</div >
245
- <div class =" links" >
246
- <div class =" title bold" >Links</div >
247
- <ul >
248
- <li >
249
- <a
250
- :href =" graphLink(props.artifact, props.metric, props.testCase)"
251
- target =" _blank"
252
- >
253
- History graph
254
- </a >
255
- </li >
256
- <li >
257
- <a
258
- :href =" detailedQueryLink(props.artifact, props.baseArtifact)"
259
- target =" _blank"
260
- >
261
- Self profile (diff)
262
- </a >
263
- </li >
264
- <li >
265
- <a :href =" detailedQueryLink(props.baseArtifact)" target =" _blank" >
266
- Self profile (before)
267
- </a >
268
- </li >
269
- <li >
270
- <a :href =" detailedQueryLink(props.artifact)" target =" _blank" >
271
- Self profile (after)
272
- </a >
273
- </li >
274
- <li >
275
- <a :href =" benchmarkLink(testCase.benchmark)" target =" _blank" >
276
- Benchmark source code
277
- </a >
278
- </li >
279
- </ul >
286
+ <div class =" command" >
287
+ <div class =" title bold" >
288
+ Local profiling command<Tooltip >
289
+ Execute this command in a checkout of
290
+ <a href =" https://github.com/rust-lang/rustc-perf" >rustc-perf</a >
291
+ to generate a Cachegrind diff between the two artifacts.
292
+ </Tooltip >
293
+ </div >
294
+ <CachegrindCmd
295
+ :commit =" artifact.commit"
296
+ :baseline_commit =" baseArtifact.commit"
297
+ :test-case =" testCase"
298
+ />
280
299
</div >
281
300
</div >
282
301
</template >
283
302
284
303
<style scoped lang="scss">
285
- .wrapper {
304
+ .columns {
286
305
display : flex ;
306
+ flex-wrap : wrap ;
307
+ gap : 15px ;
287
308
margin : 10px 0 ;
309
+
310
+ .grow {
311
+ flex-grow : 1 ;
312
+ }
313
+ }
314
+ .rows {
315
+ display : flex ;
316
+ flex-direction : column ;
317
+ gap : 15px ;
318
+
319
+ & .center-items {
320
+ align-items : center ;
321
+ }
322
+ }
323
+ .command {
324
+ text-align : left ;
288
325
}
289
326
290
327
.title {
0 commit comments