@@ -103,16 +103,16 @@ private const val BENCHMARKS_ROOT = "src/jmh/java/"
103
103
104
104
private val listImpls = listOf (
105
105
KotlinListImplementation ,
106
- PaguroRrbTreeListImplementation ,
106
+ PaguroListImplementation ,
107
107
CyclopsListImplementation ,
108
108
ClojureListImplementation ,
109
109
ScalaListImplementation ,
110
110
VavrListImplementation
111
111
)
112
112
private val listBuilderImpls = listOf (
113
- ListBuilderKotlinBenchmark () ,
114
- ListBuilderPaguroBenchmark () ,
115
- ListBuilderClojureBenchmark ()
113
+ KotlinListBuilderImplementation ,
114
+ PaguroListBuilderImplementation ,
115
+ ClojureListBuilderImplementation
116
116
)
117
117
118
118
private val mapImpls = listOf (
@@ -178,13 +178,22 @@ fun generateBenchmarks() {
178
178
listImpls.filterIsInstance<ListRemoveBenchmark>().map { ListRemoveBenchmarkGenerator(it) },
179
179
listImpls.filterIsInstance<ListSetBenchmark>().map { ListSetBenchmarkGenerator(it) }
180
180
)*/
181
- val listBuilderBenchmarks = listOf (
181
+ val listBuilderBenchmarks = listBuilderImpls.map { listOf (
182
+ ListBuilderAddBenchmarkGenerator (it),
183
+ ListBuilderGetBenchmarkGenerator (it),
184
+ ListBuilderRemoveBenchmarkGenerator (it),
185
+ ListBuilderSetBenchmarkGenerator (it),
186
+ ListBuilderUtilsGenerator (it)
187
+ ) } + listBuilderImpls.filter(ListBuilderImplementation ::isIterable).map { listOf (
188
+ ListBuilderIterateBenchmarkGenerator (it)
189
+ ) }
190
+ /* listOf(
182
191
listBuilderImpls.filterIsInstance<ListBuilderAddBenchmark>().map { ListBuilderAddBenchmarkGenerator(it) },
183
192
listBuilderImpls.filterIsInstance<ListBuilderGetBenchmark>().map { ListBuilderGetBenchmarkGenerator(it) },
184
193
listBuilderImpls.filterIsInstance<ListBuilderIterateBenchmark>().map { ListBuilderIterateBenchmarkGenerator(it) },
185
194
listBuilderImpls.filterIsInstance<ListBuilderRemoveBenchmark>().map { ListBuilderRemoveBenchmarkGenerator(it) },
186
195
listBuilderImpls.filterIsInstance<ListBuilderSetBenchmark>().map { ListBuilderSetBenchmarkGenerator(it) }
187
- )
196
+ )*/
188
197
189
198
val mapBenchmarks = listOf (
190
199
mapImpls.filterIsInstance<MapGetBenchmark >().map { MapGetBenchmarkGenerator (it) },
@@ -226,8 +235,6 @@ fun generateBenchmarks() {
226
235
}
227
236
228
237
fun generateUtils () {
229
- val listBuilderUtils = listBuilderImpls.filterIsInstance<ListBuilderBenchmarkUtils >().map { ListBuilderUtilsGenerator (it) }
230
-
231
238
val mapUtils = mapImpls.filterIsInstance<MapBenchmarkUtils >().map { MapUtilsGenerator (it) }
232
239
val mapBuilderUtils = mapBuilderImpls.filterIsInstance<MapBuilderBenchmarkUtils >().map { MapBuilderUtilsGenerator (it) }
233
240
@@ -239,7 +246,7 @@ fun generateUtils() {
239
246
CommonUtilsGenerator ()
240
247
)
241
248
242
- val utils = listBuilderUtils + mapUtils + mapBuilderUtils + setUtils + setBuilderUtils + commonUtils
249
+ val utils = mapUtils + mapBuilderUtils + setUtils + setBuilderUtils + commonUtils
243
250
244
251
utils.forEach { util ->
245
252
val path = util.getPackage().replace(' .' , ' /' ) + " /" + util.outputFileName + " .kt"
0 commit comments