-
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
28 changed files
with
1,240 additions
and
369 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 was deleted.
Oops, something went wrong.
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,47 @@ | ||
/* | ||
* 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 rsocketbuild.* | ||
|
||
plugins { | ||
id("rsocketbuild.multiplatform-benchmarks") | ||
} | ||
|
||
kotlin { | ||
jvmTarget() | ||
|
||
sourceSets { | ||
jvmMain.dependencies { | ||
implementation(projects.benchmarksShared) | ||
|
||
implementation(libs.kotlinx.coroutines.reactor) | ||
implementation(libs.rsocket.java.transport.local) | ||
implementation(libs.rsocket.java.transport.netty) | ||
} | ||
} | ||
} | ||
|
||
benchmark { | ||
targets { | ||
register("jvm") { | ||
this as JvmBenchmarkTarget | ||
jmhVersion = libs.versions.jmh.get() | ||
} | ||
} | ||
|
||
registerBenchmarks("RSocketJava", listOf("local", "tcp", "ws")) | ||
} |
25 changes: 25 additions & 0 deletions
25
benchmarks/rsocket-java/src/jvmMain/kotlin/LocalRSocketJavaBenchmark.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,25 @@ | ||
/* | ||
* 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.local.* | ||
|
||
class LocalRSocketJavaBenchmark : RSocketJavaBenchmark() { | ||
override val serverTransport: ServerTransport<*> = LocalServerTransport.create("local") | ||
override val clientTransport: ClientTransport = LocalClientTransport.create("local") | ||
} |
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/TcpRSocketJavaBenchmark.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 TcpRSocketJavaBenchmark : RSocketJavaBenchmark() { | ||
override val serverTransport: ServerTransport<*> = TcpServerTransport.create(9000) | ||
override val clientTransport: ClientTransport = TcpClientTransport.create(9000) | ||
} |
Oops, something went wrong.