-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
383 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Benchmarks CI | ||
on: | ||
push: | ||
|
||
jobs: | ||
benchmark: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-gradle | ||
- run: ./gradlew assembleBenchmarks | ||
|
||
- run: > | ||
./gradlew | ||
FastCsvLocalRequestChannelBenchmark | ||
FastCsvLocalRequestResponseBenchmark | ||
FastCsvLocalRequestStreamBenchmark | ||
--dry-run | ||
- run: > | ||
./gradlew | ||
FastCsvLocalRequestChannelBenchmark | ||
FastCsvLocalRequestResponseBenchmark | ||
FastCsvLocalRequestStreamBenchmark | ||
--no-parallel | ||
--max-workers=1 | ||
- if: always() && !cancelled() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: benchmark-reports-${{ matrix.os }} | ||
path: "benchmarks/**/build/reports/benchmarks/**/*.csv" | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
benchmarks/rsocket-java/src/jvmMain/kotlin/WsRSocketJavaBenchmark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2015-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.rsocket.kotlin.benchmarks.java | ||
|
||
import io.rsocket.transport.* | ||
import io.rsocket.transport.netty.client.* | ||
import io.rsocket.transport.netty.server.* | ||
|
||
class WsRSocketJavaBenchmark : RSocketJavaBenchmark() { | ||
override val serverTransport: ServerTransport<*> = WebsocketServerTransport.create(9000) | ||
override val clientTransport: ClientTransport = WebsocketClientTransport.create(9000) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright 2015-2024 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import kotlinx.benchmark.gradle.* | ||
import org.gradle.kotlin.dsl.benchmark | ||
import rsocketbuild.* | ||
|
||
plugins { | ||
id("rsocketbuild.multiplatform-benchmarks") | ||
} | ||
|
||
kotlin { | ||
jvmTarget() | ||
|
||
// no mingw because of cio | ||
macosX64() | ||
macosArm64() | ||
linuxX64() | ||
|
||
sourceSets { | ||
commonMain.dependencies { | ||
implementation(projects.benchmarksShared) | ||
implementation("io.rsocket.kotlin:rsocket-transport-local:0.16.0") | ||
implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:0.16.0") | ||
} | ||
} | ||
} | ||
|
||
benchmark { | ||
targets { | ||
register("jvm") { | ||
this as JvmBenchmarkTarget | ||
jmhVersion = libs.versions.jmh.get() | ||
} | ||
register("macosArm64") | ||
register("macosX64") | ||
register("linuxX64") | ||
} | ||
registerBenchmarks("RSocketKotlin_0_16_", listOf("local", "ktorTcp")) { transport -> | ||
if (transport == "local") { | ||
param("dispatcher", "DEFAULT", "UNCONFINED") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.