Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions site/frontend/src/pages/compare/compile/compile-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,6 @@ function updateFilter(newFilter: CompileBenchmarkFilter) {
refreshQuickLinks();
}

// We pass the event target here, because Parcel cannot handle the `as`
// cast directly in the template.
function updateSelfCompareBackend(target: EventTarget) {
const element = target as HTMLInputElement;
updateFilter({...filter.value, selfCompareBackend: element.checked});
}

/**
* When the filter changes, the URL is updated.
* After that happens, we want to re-render the quick links component, because
Expand Down Expand Up @@ -261,20 +254,10 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
:selected-metric="selector.stat"
:metrics="benchmarkInfo.compile_metrics"
/>
<div
v-if="canCompareBackends"
:title="`Compare codegen backends for commit '${props.data.a.commit}'`"
>
Compare codegen backends for this commit:
<input
type="checkbox"
:checked="selfCompareBackend"
@change="(e) => updateSelfCompareBackend(e.target)"
/>
</div>
<Filters
:defaultFilter="defaultCompileFilter"
:initialFilter="filter"
:default-filter="defaultCompileFilter"
:initial-filter="filter"
:can-compare-backends="canCompareBackends"
@change="updateFilter"
@export="exportData"
/>
Expand Down
11 changes: 10 additions & 1 deletion site/frontend/src/pages/compare/compile/filters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const props = defineProps<{
defaultFilter: CompileBenchmarkFilter;
// Initialize the filter with this value
initialFilter: CompileBenchmarkFilter;
canCompareBackends: boolean;
}>();
const emit = defineEmits<{
(e: "change", filter: CompileBenchmarkFilter): void;
Expand Down Expand Up @@ -192,7 +193,7 @@ const opened = createPersistedRef(PREF_FILTERS_OPENED);
<input type="checkbox" v-model="filter.backend.llvm" />
<span class="label">LLVM</span>
</label>
<Tooltip>The default LLVM backend. </Tooltip>
<Tooltip>The default LLVM backend.</Tooltip>
</li>
<li>
<label>
Expand Down Expand Up @@ -289,6 +290,14 @@ const opened = createPersistedRef(PREF_FILTERS_OPENED);
style="margin-left: 20px"
/>
</div>
<div
class="section"
v-if="canCompareBackends"
:title="`Compare codegen backends for this commit`"
>
Compare codegen backends for this commit:
<input type="checkbox" v-model="filter.selfCompareBackend" />
</div>
<button @click="reset" style="margin-right: 10px">
Reset filters
</button>
Expand Down
Loading