@@ -4,6 +4,8 @@ import Tooltip from "../tooltip.vue";
4
4
import {percentClass } from " ../shared" ;
5
5
import {RuntimeTestCase } from " ./common" ;
6
6
import {computed } from " vue" ;
7
+ import Accordion from " ../../../components/accordion.vue" ;
8
+ import {testCaseKey } from " ./common" ;
7
9
8
10
const props = defineProps <{
9
11
comparisons: TestCaseComparison <RuntimeTestCase >[];
@@ -66,52 +68,55 @@ const unit = computed(() => {
66
68
</thead >
67
69
<tbody >
68
70
<template v-for =" comparison in comparisons " >
69
- <tr >
70
- <td >
71
- {{ comparison.testCase.benchmark }}
72
- </td >
73
- <td >
74
- <div class =" numeric-aligned" >
75
- <div >
76
- <span v-bind:class =" percentClass(comparison.percent)" >
77
- {{ comparison.percent.toFixed(2) }}%
78
- </span >
71
+ <Accordion :id =" testCaseKey(comparison.testCase)" >
72
+ <template v-slot :default >
73
+ <td >
74
+ {{ comparison.testCase.benchmark }}
75
+ </td >
76
+ <td >
77
+ <div class =" numeric-aligned" >
78
+ <div >
79
+ <span v-bind:class =" percentClass(comparison.percent)" >
80
+ {{ comparison.percent.toFixed(2) }}%
81
+ </span >
82
+ </div >
79
83
</div >
80
- </div >
81
- </ td >
82
- < td >
83
- <div class = " numeric-aligned " >
84
- < div >
85
- {{
86
- comparison.significanceThreshold
87
- ? comparison.significanceThreshold.toFixed(2) + "% "
88
- : "-"
89
- }}
84
+ </td >
85
+ < td >
86
+ < div class = " numeric-aligned " >
87
+ <div >
88
+ {{
89
+ comparison.significanceThreshold
90
+ ? comparison.significanceThreshold.toFixed(2) + "%"
91
+ : "- "
92
+ }}
93
+ </ div >
90
94
</div >
91
- </div >
92
- </ td >
93
- < td >
94
- <div class = " numeric-aligned " >
95
- < div >
96
- {{
97
- comparison.significanceFactor
98
- ? comparison.significanceFactor.toFixed(2) + "x "
99
- : "-"
100
- }}
95
+ </td >
96
+ < td >
97
+ < div class = " numeric-aligned " >
98
+ <div >
99
+ {{
100
+ comparison.significanceFactor
101
+ ? comparison.significanceFactor.toFixed(2) + "x"
102
+ : "- "
103
+ }}
104
+ </ div >
101
105
</div >
102
- </div >
103
- </td >
104
- <td v-if =" showRawData" class =" numeric" >
105
- <abbr :title =" comparison.datumA.toString()"
106
- >{{ prettifyRawNumber(comparison.datumA) }}{{ unit }}</abbr
107
- >
108
- </td >
109
- <td v-if =" showRawData" class =" numeric" >
110
- <abbr :title =" comparison.datumB.toString()"
111
- >{{ prettifyRawNumber(comparison.datumB) }}{{ unit }}</abbr
112
- >
113
- </td >
114
- </tr >
106
+ </td >
107
+ <td v-if =" showRawData" class =" numeric" >
108
+ <abbr :title =" comparison.datumA.toString()"
109
+ >{{ prettifyRawNumber(comparison.datumA) }}{{ unit }}</abbr
110
+ >
111
+ </td >
112
+ <td v-if =" showRawData" class =" numeric" >
113
+ <abbr :title =" comparison.datumB.toString()"
114
+ >{{ prettifyRawNumber(comparison.datumB) }}{{ unit }}</abbr
115
+ >
116
+ </td >
117
+ </template >
118
+ <template v-slot :collapsed > </template >
119
+ </Accordion >
115
120
</template >
116
121
</tbody >
117
122
</table >
@@ -122,6 +127,7 @@ const unit = computed(() => {
122
127
.benches {
123
128
font-size : medium ;
124
129
table-layout : fixed ;
130
+ border-collapse : collapse ;
125
131
126
132
td ,
127
133
th {
0 commit comments