rust-lang/rustc-perf

The Intention behind the unused function `hasSpecificSelection`

chengr4 opened this issue · 4 comments

Hi,

In graphs page, I have found out the function hasSpecificSelection is never used.

Just curious. Do we keep it for future feature need?

/*
 * Returns true if a specific subset of charts is selected by benchmark
 * name, profile or scenario. In that case, the regular aligned grid of charts
 * will not be shown.
 */
function hasSpecificSelection(selector: GraphsSelector): boolean {
  return (
    selector.benchmark !== null ||
    selector.profile !== null ||
    selector.scenario !== null
  );
}

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

Hi, this function is used on lines 75 and 148 of the same file.

But we are not able to give benchmark, profile and scenario any value on the graph page, which means hasSpecificSelection is always false.

It cannot be selected through the UI, but it can be passed via URL parameters. It is used to link to the graphs page from the compare page. Try to click on the "History graph" button in a benchmark detail.
image

Got it! thanks for explanation.