Skip to content

Commit 8b84114

Browse files
committed
Rename refactoring for Js and Wasm executors
1 parent 0f4e034 commit 8b84114

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ enum class Platform(
1919
val benchmarkDescriptorWithBlackholeParameterClass: String
2020
) {
2121
JsBuiltIn(
22-
executorClass = "kotlinx.benchmark.js.JsSimpleExecutor",
22+
executorClass = "kotlinx.benchmark.js.JsBuiltInExecutor",
2323
suiteDescriptorClass = "kotlinx.benchmark.SuiteDescriptor",
2424
benchmarkDescriptorClass = "kotlinx.benchmark.js.JsBenchmarkDescriptorWithNoBlackholeParameter",
2525
benchmarkDescriptorWithBlackholeParameterClass = "kotlinx.benchmark.js.JsBenchmarkDescriptorWithBlackholeParameter",
2626
),
2727
JsBenchmarkJs(
28-
executorClass = "kotlinx.benchmark.js.JsExecutor",
28+
executorClass = "kotlinx.benchmark.js.JsBenchmarkExecutor",
2929
suiteDescriptorClass = "kotlinx.benchmark.SuiteDescriptor",
3030
benchmarkDescriptorClass = "kotlinx.benchmark.js.JsBenchmarkDescriptorWithNoBlackholeParameter",
3131
benchmarkDescriptorWithBlackholeParameterClass = "kotlinx.benchmark.js.JsBenchmarkDescriptorWithBlackholeParameter",
@@ -37,7 +37,7 @@ enum class Platform(
3737
benchmarkDescriptorWithBlackholeParameterClass = "kotlinx.benchmark.BenchmarkDescriptorWithBlackholeParameter",
3838
),
3939
WasmBuiltIn(
40-
executorClass = "kotlinx.benchmark.wasm.WasmExecutor",
40+
executorClass = "kotlinx.benchmark.wasm.WasmBuiltInExecutor",
4141
suiteDescriptorClass = "kotlinx.benchmark.SuiteDescriptor",
4242
benchmarkDescriptorClass = "kotlinx.benchmark.BenchmarkDescriptorWithNoBlackholeParameter",
4343
benchmarkDescriptorWithBlackholeParameterClass = "kotlinx.benchmark.BenchmarkDescriptorWithBlackholeParameter",

runtime/commonMain/src/kotlinx/benchmark/CommonSuitExecutor.kt renamed to runtime/commonMain/src/kotlinx/benchmark/CommonSuiteExecutor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package kotlinx.benchmark
22

3-
abstract class CommonSuitExecutor(
3+
abstract class CommonSuiteExecutor(
44
executionName: String,
55
configPath: String,
66
xmlReporter: (() -> BenchmarkProgress)? = null

runtime/jsMain/src/kotlinx/benchmark/js/JsExecutor.kt renamed to runtime/jsMain/src/kotlinx/benchmark/js/JsBenchmarkExecutor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package kotlinx.benchmark.js
33
import kotlinx.benchmark.*
44
import kotlin.js.Promise
55

6-
class JsExecutor(name: String, @Suppress("UNUSED_PARAMETER") dummy_args: Array<out String>) :
6+
class JsBenchmarkExecutor(name: String, @Suppress("UNUSED_PARAMETER") dummy_args: Array<out String>) :
77
SuiteExecutor(name, jsEngineSupport.arguments()[0]) {
88

99
init {
10-
check(!isD8) { "${JsExecutor::class.simpleName} does not supports d8 engine" }
10+
check(!isD8) { "${JsBenchmarkExecutor::class.simpleName} does not supports d8 engine" }
1111
}
1212

1313
private val benchmarkJs: dynamic = require("benchmark")

runtime/jsMain/src/kotlinx/benchmark/js/JsSimpleExecutor.kt renamed to runtime/jsMain/src/kotlinx/benchmark/js/JsBuiltInExecutor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import kotlin.math.sin
99
@JsName("Function")
1010
private external fun functionCtor(params: String, code: String): (dynamic) -> Long
1111

12-
class JsSimpleExecutor(
12+
class JsBuiltInExecutor(
1313
name: String,
1414
@Suppress("UNUSED_PARAMETER") dummy_args: Array<out String>
15-
) : CommonSuitExecutor(name, jsEngineSupport.arguments()[0]) {
15+
) : CommonSuiteExecutor(name, jsEngineSupport.arguments()[0]) {
1616

1717
private val BenchmarkConfiguration.jsUseBridge: Boolean
1818
get() = "true".equals(advanced["jsUseBridge"], ignoreCase = true)

runtime/wasmMain/src/kotlinx/benchmark/wasm/WasmExecutor.kt renamed to runtime/wasmMain/src/kotlinx/benchmark/wasm/WasmBuiltInExecutor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package kotlinx.benchmark.wasm
22

33
import kotlinx.benchmark.*
44

5-
class WasmExecutor(
5+
class WasmBuiltInExecutor(
66
name: String,
77
@Suppress("UNUSED_PARAMETER") dummy_args: Array<out String>
8-
) : CommonSuitExecutor(name, jsEngineSupport.arguments()[0])
8+
) : CommonSuiteExecutor(name, jsEngineSupport.arguments()[0])

0 commit comments

Comments
 (0)