File tree Expand file tree Collapse file tree 2 files changed +13
-21
lines changed
site/frontend/src/pages/compare/compile Expand file tree Collapse file tree 2 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -193,13 +193,6 @@ function updateFilter(newFilter: CompileBenchmarkFilter) {
193193 refreshQuickLinks ();
194194}
195195
196- // We pass the event target here, because Parcel cannot handle the `as`
197- // cast directly in the template.
198- function updateSelfCompareBackend(target : EventTarget ) {
199- const element = target as HTMLInputElement ;
200- updateFilter ({... filter .value , selfCompareBackend: element .checked });
201- }
202-
203196/**
204197 * When the filter changes, the URL is updated.
205198 * After that happens, we want to re-render the quick links component, because
@@ -261,20 +254,10 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
261254 :selected-metric =" selector.stat"
262255 :metrics =" benchmarkInfo.compile_metrics"
263256 />
264- <div
265- v-if =" canCompareBackends"
266- :title =" `Compare codegen backends for commit '${props.data.a.commit}'`"
267- >
268- Compare codegen backends for this commit:
269- <input
270- type =" checkbox"
271- :checked =" selfCompareBackend"
272- @change =" (e) => updateSelfCompareBackend(e.target)"
273- />
274- </div >
275257 <Filters
276- :defaultFilter =" defaultCompileFilter"
277- :initialFilter =" filter"
258+ :default-filter =" defaultCompileFilter"
259+ :initial-filter =" filter"
260+ :can-compare-backends =" canCompareBackends"
278261 @change =" updateFilter"
279262 @export =" exportData"
280263 />
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const props = defineProps<{
1212 defaultFilter: CompileBenchmarkFilter ;
1313 // Initialize the filter with this value
1414 initialFilter: CompileBenchmarkFilter ;
15+ canCompareBackends: boolean ;
1516}>();
1617const emit = defineEmits <{
1718 (e : " change" , filter : CompileBenchmarkFilter ): void ;
@@ -192,7 +193,7 @@ const opened = createPersistedRef(PREF_FILTERS_OPENED);
192193 <input type =" checkbox" v-model =" filter.backend.llvm" />
193194 <span class =" label" >LLVM</span >
194195 </label >
195- <Tooltip >The default LLVM backend. </Tooltip >
196+ <Tooltip >The default LLVM backend.</Tooltip >
196197 </li >
197198 <li >
198199 <label >
@@ -289,6 +290,14 @@ const opened = createPersistedRef(PREF_FILTERS_OPENED);
289290 style =" margin-left : 20px "
290291 />
291292 </div >
293+ <div
294+ class =" section"
295+ v-if =" canCompareBackends"
296+ :title =" `Compare codegen backends for this commit`"
297+ >
298+ Compare codegen backends for this commit:
299+ <input type =" checkbox" v-model =" filter.selfCompareBackend" />
300+ </div >
292301 <button @click =" reset" style =" margin-right : 10px " >
293302 Reset filters
294303 </button >
You can’t perform that action at this time.
0 commit comments