File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed
site/frontend/src/pages/compare Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -81,17 +81,15 @@ async function loadCompareData(
81
81
)
82
82
)
83
83
);
84
- if (response .runtime_comparisons .length > 0 ) {
85
- runtimeSummary .value = computeSummary (
86
- filterNonRelevant (
84
+ runtimeSummary .value = computeSummary (
85
+ filterNonRelevant (
86
+ defaultRuntimeFilter ,
87
+ computeRuntimeComparisonsWithNonRelevant (
87
88
defaultRuntimeFilter ,
88
- computeRuntimeComparisonsWithNonRelevant (
89
- defaultRuntimeFilter ,
90
- response .runtime_comparisons
91
- )
89
+ response .runtime_comparisons
92
90
)
93
- );
94
- }
91
+ )
92
+ );
95
93
}
96
94
97
95
function updateSelection(params : SelectionParams ) {
@@ -120,16 +118,12 @@ const selector = loadSelectorFromUrl(urlParams);
120
118
const initialTab: Tab = loadTabFromUrl (urlParams ) ?? Tab .CompileTime ;
121
119
const tab: Ref <Tab > = ref (initialTab );
122
120
const activeTab = computed ((): Tab => {
123
- if (tab .value === Tab .Runtime && ! runtimeDataAvailable .value ) {
124
- return Tab .CompileTime ;
125
- }
126
121
if (tab .value === Tab .ArtifactSize && ! artifactSizeAvailable .value ) {
127
122
return Tab .CompileTime ;
128
123
}
129
124
return tab .value ;
130
125
});
131
126
132
- const runtimeDataAvailable = computed (() => runtimeSummary .value !== null );
133
127
const artifactSizeAvailable = computed (
134
128
() =>
135
129
data .value != null &&
@@ -174,7 +168,7 @@ loadCompareData(selector, loading);
174
168
:benchmark-info =" info"
175
169
/>
176
170
</template >
177
- <template v-if =" runtimeDataAvailable && activeTab === Tab .Runtime " >
171
+ <template v-if =" activeTab === Tab .Runtime " >
178
172
<RuntimeBenchmarksPage
179
173
:data =" data"
180
174
:selector =" selector"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const props = withDefaults(
15
15
defineProps <{
16
16
data: CompareResponse ;
17
17
compileTimeSummary: SummaryGroup ;
18
- runtimeSummary: SummaryGroup | null ;
18
+ runtimeSummary: SummaryGroup ;
19
19
initialTab? : Tab ;
20
20
}>(),
21
21
{
@@ -65,7 +65,7 @@ function SummaryTable({summary}: {summary: SummaryGroup}) {
65
65
</table >
66
66
);
67
67
}
68
- return <div >No relevant results</div >;
68
+ return <div >No results</div >;
69
69
}
70
70
71
71
function formatArtifactSize(size : number ): string {
@@ -79,8 +79,6 @@ const bootstrapA = props.data.a.bootstrap_total;
79
79
const bootstrapB = props .data .b .bootstrap_total ;
80
80
const bootstrapValid = bootstrapA > 0.0 && bootstrapB > 0.0 ;
81
81
82
- const runtimeAvailable = computed (() => props .runtimeSummary !== null );
83
-
84
82
const totalSizeA = Object .values (props .data .a .component_sizes ).reduce (
85
83
(a , b ) => a + b ,
86
84
0
@@ -109,7 +107,6 @@ const activeTab: Ref<Tab> = ref(props.initialTab);
109
107
</div >
110
108
</div >
111
109
<div
112
- v-if =" runtimeAvailable"
113
110
class =" tab"
114
111
title =" Runtime benchmarks: measure how long does it take to execute (i.e. how fast are) programs compiled by the compared rustc."
115
112
:class =" {selected: activeTab === Tab.Runtime}"
You can’t perform that action at this time.
0 commit comments