@@ -11,18 +11,22 @@ export interface BenchmarkInfo {
11
11
type : BenchmarkType ;
12
12
label : string ;
13
13
description : string ;
14
+ dynamicCountMultiplicity ?: number
14
15
}
15
16
16
17
export abstract class Benchmark {
17
18
id : string ;
18
19
type : BenchmarkType ;
19
20
label : string ;
20
21
description : string ;
22
+ dynamicCountMultiplicity ?: number
23
+
21
24
constructor ( public benchmarkInfo : BenchmarkInfo ) {
22
25
this . id = benchmarkInfo . id ;
23
26
this . type = benchmarkInfo . type ;
24
27
this . label = benchmarkInfo . label ;
25
28
this . description = benchmarkInfo . description ;
29
+ this . dynamicCountMultiplicity = benchmarkInfo . dynamicCountMultiplicity ;
26
30
}
27
31
abstract init ( driver : WebDriver , framework : FrameworkData ) : Promise < any > ;
28
32
abstract run ( driver : WebDriver , framework : FrameworkData ) : Promise < any > ;
@@ -50,7 +54,8 @@ const benchRun = new class extends Benchmark {
50
54
id : "01_run1k" ,
51
55
label : "create rows" ,
52
56
description : "Duration for creating 1000 rows after the page loaded." ,
53
- type : BenchmarkType . CPU
57
+ type : BenchmarkType . CPU ,
58
+ dynamicCountMultiplicity : 3
54
59
} )
55
60
}
56
61
async init ( driver : WebDriver ) { await testElementLocatedById ( driver , "add" , SHORT_TIMEOUT ) ; }
@@ -67,6 +72,7 @@ const benchReplaceAll = new class extends Benchmark {
67
72
label : "replace all rows" ,
68
73
description : "Duration for updating all 1000 rows of the table (with " + config . WARMUP_COUNT + " warmup iterations)." ,
69
74
type : BenchmarkType . CPU ,
75
+ dynamicCountMultiplicity : 3
70
76
} )
71
77
}
72
78
async init ( driver : WebDriver ) {
@@ -88,6 +94,7 @@ const benchUpdate = new class extends Benchmark {
88
94
label : "partial update" ,
89
95
description : "Time to update the text of every 10th row (with " + config . WARMUP_COUNT + " warmup iterations) for a table with 10k rows." ,
90
96
type : BenchmarkType . CPU ,
97
+ dynamicCountMultiplicity : 3
91
98
} )
92
99
}
93
100
async init ( driver : WebDriver ) {
@@ -112,6 +119,7 @@ const benchSelect = new class extends Benchmark {
112
119
label : "select row" ,
113
120
description : "Duration to highlight a row in response to a click on the row. (with " + config . WARMUP_COUNT + " warmup iterations)." ,
114
121
type : BenchmarkType . CPU ,
122
+ dynamicCountMultiplicity : 6
115
123
} )
116
124
}
117
125
async init ( driver : WebDriver ) {
@@ -135,6 +143,7 @@ const benchSwapRows = new class extends Benchmark {
135
143
label : "swap rows" ,
136
144
description : "Time to swap 2 rows on a 1K table. (with " + config . WARMUP_COUNT + " warmup iterations)." ,
137
145
type : BenchmarkType . CPU ,
146
+ dynamicCountMultiplicity : 6
138
147
} )
139
148
}
140
149
async init ( driver : WebDriver ) {
@@ -161,6 +170,7 @@ const benchRemove = new class extends Benchmark {
161
170
label : "remove row" ,
162
171
description : "Duration to remove a row. (with " + config . WARMUP_COUNT + " warmup iterations)." ,
163
172
type : BenchmarkType . CPU ,
173
+ dynamicCountMultiplicity : 4
164
174
} )
165
175
}
166
176
async init ( driver : WebDriver ) {
@@ -188,6 +198,7 @@ const benchRunBig = new class extends Benchmark {
188
198
label : "create many rows" ,
189
199
description : "Duration to create 10,000 rows" ,
190
200
type : BenchmarkType . CPU ,
201
+ dynamicCountMultiplicity : 1
191
202
} )
192
203
}
193
204
async init ( driver : WebDriver ) {
@@ -206,6 +217,7 @@ const benchAppendToManyRows = new class extends Benchmark {
206
217
label : "append rows to large table" ,
207
218
description : "Duration for adding 1000 rows on a table of 10,000 rows." ,
208
219
type : BenchmarkType . CPU ,
220
+ dynamicCountMultiplicity : 1
209
221
} )
210
222
}
211
223
async init ( driver : WebDriver ) {
@@ -226,6 +238,7 @@ const benchClear = new class extends Benchmark {
226
238
label : "clear rows" ,
227
239
description : "Duration to clear the table filled with 10.000 rows." ,
228
240
type : BenchmarkType . CPU ,
241
+ dynamicCountMultiplicity : 3
229
242
} )
230
243
}
231
244
async init ( driver : WebDriver ) {
0 commit comments