@@ -130,7 +130,7 @@ function createGraphsSelector(): CompileDetailGraphsSelector {
130
130
stat: props .metric ,
131
131
start ,
132
132
end ,
133
- kinds: [" percentrelative" , " raw " ] as GraphKind [],
133
+ kinds: [" percentrelative" , " percentfromfirst " ] as GraphKind [],
134
134
};
135
135
}
136
136
@@ -193,7 +193,10 @@ async function renderGraphs(detail: CompileDetailGraphs) {
193
193
0 ,
194
194
" percentrelative"
195
195
);
196
- const [rawData, rawSelector] = buildGraph (1 , " raw" );
196
+ const [percentFromFirstData, percentFromFirstSelector] = buildGraph (
197
+ 1 ,
198
+ " percentfromfirst"
199
+ );
197
200
198
201
// We want to be able to see noise "blips" vs. a previous artifact.
199
202
// The "percent relative from previous commit" graph should be the best to
@@ -202,11 +205,18 @@ async function renderGraphs(detail: CompileDetailGraphs) {
202
205
percentRelativeData ,
203
206
percentRelativeSelector ,
204
207
date ,
205
- relativeChartElement
208
+ relativeToPreviousChartElement
206
209
);
207
210
// We also want to see whether a change maintained its value or whether it was noise and has since
208
- // returned to steady state. Here, an absolute graph ("raw") is best.
209
- renderGraph (rawData , rawSelector , date , absoluteChartElement );
211
+ // returned to steady state. Here, an absolute graph ("raw") would be best, however small changes
212
+ // are hard to observe in it. Therefore, we use "percent from first commit" graph instead, which
213
+ // is essentialy a "zoomed-in" version of the raw graph.
214
+ renderGraph (
215
+ percentFromFirstData ,
216
+ percentFromFirstSelector ,
217
+ date ,
218
+ relativeToFirstChartElement
219
+ );
210
220
}
211
221
212
222
async function renderGraph(
@@ -284,8 +294,8 @@ const cargoProfile = computed((): CargoProfileMetadata => {
284
294
}
285
295
});
286
296
287
- const relativeChartElement : Ref <HTMLElement | null > = ref (null );
288
- const absoluteChartElement : Ref <HTMLElement | null > = ref (null );
297
+ const relativeToPreviousChartElement : Ref <HTMLElement | null > = ref (null );
298
+ const relativeToFirstChartElement : Ref <HTMLElement | null > = ref (null );
289
299
const graphRange = computed (() =>
290
300
getGraphRange (props .artifact , props .baseArtifact )
291
301
);
@@ -402,14 +412,15 @@ onMounted(() => {
402
412
<div class =" title" >
403
413
<div class =" bold" >{{ getGraphTitle() }}</div >
404
414
<div style =" font-size : 0.8em " >
405
- Plot of the absolute values of the current metric
415
+ Each plotted value is relative to the first commit of the commit
416
+ range
406
417
</div >
407
418
<div style =" font-size : 0.8em " >
408
419
The shaded region shows values that are more recent than the
409
420
benchmarked commit
410
421
</div >
411
422
</div >
412
- <div ref =" absoluteChartElement " ></div >
423
+ <div ref =" relativeToFirstChartElement " ></div >
413
424
</div >
414
425
<div class =" rows center-items grow" >
415
426
<div class =" title" >
@@ -422,7 +433,7 @@ onMounted(() => {
422
433
benchmarked commit
423
434
</div >
424
435
</div >
425
- <div ref =" relativeChartElement " ></div >
436
+ <div ref =" relativeToPreviousChartElement " ></div >
426
437
</div >
427
438
</div >
428
439
<div class =" columns" v-if =" props.metric !== BINARY_SIZE_METRIC" >
0 commit comments