Skip to content

Commit 79cd1a2

Browse files
authored
Setup benchmarks for all transports (#293)
1 parent 33a6735 commit 79cd1a2

27 files changed

+1352
-373
lines changed

.github/workflows/ci-benchmarks.yml

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: Benchmarks CI
2+
on: [ workflow_dispatch ]
3+
4+
jobs:
5+
benchmark-local:
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ ubuntu-latest, macos-latest ]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: ./.github/actions/setup-gradle
14+
15+
- run: >
16+
./gradlew
17+
localRequestResponseBenchmark
18+
localRequestStreamBenchmark
19+
localRequestChannelBenchmark
20+
-Prsocketbuild.skipBenchmarkTasks=true
21+
--no-daemon
22+
23+
- run: >
24+
./gradlew
25+
localRequestResponseBenchmark
26+
--no-parallel
27+
--max-workers=1
28+
--no-daemon
29+
--continue
30+
31+
- run: >
32+
./gradlew
33+
localRequestStreamBenchmark
34+
--no-parallel
35+
--max-workers=1
36+
--no-daemon
37+
--continue
38+
39+
- run: >
40+
./gradlew
41+
localRequestChannelBenchmark
42+
--no-parallel
43+
--max-workers=1
44+
--no-daemon
45+
--continue
46+
47+
- if: always() && !cancelled()
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: benchmark-reports-local-${{ matrix.os }}
51+
path: "rsocket-transport-benchmarks/**/build/reports/benchmarks/**/*.csv"
52+
retention-days: 7
53+
54+
benchmark-network-rr:
55+
runs-on: ${{ matrix.os }}
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
os: [ ubuntu-latest, macos-latest ]
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: ./.github/actions/setup-gradle
63+
64+
- run: >
65+
./gradlew
66+
ktorTcpRequestResponseBenchmark
67+
ktorWsRequestResponseBenchmark
68+
nettyTcpRequestResponseBenchmark
69+
nettyQuicRequestResponseBenchmark
70+
-Prsocketbuild.skipBenchmarkTasks=true
71+
--no-daemon
72+
73+
- run: >
74+
./gradlew
75+
ktorTcpRequestResponseBenchmark
76+
ktorWsRequestResponseBenchmark
77+
nettyTcpRequestResponseBenchmark
78+
nettyQuicRequestResponseBenchmark
79+
--no-parallel
80+
--max-workers=1
81+
--no-daemon
82+
--continue
83+
84+
- if: always() && !cancelled()
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: benchmark-reports-network-rr-${{ matrix.os }}
88+
path: "rsocket-transport-benchmarks/**/build/reports/benchmarks/**/*.csv"
89+
retention-days: 7
90+
91+
benchmark-network-rs:
92+
runs-on: ${{ matrix.os }}
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
os: [ ubuntu-latest, macos-latest ]
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: ./.github/actions/setup-gradle
100+
101+
- run: >
102+
./gradlew
103+
ktorTcpRequestStreamBenchmark
104+
ktorWsRequestStreamBenchmark
105+
nettyTcpRequestStreamBenchmark
106+
nettyQuicRequestStreamBenchmark
107+
-Prsocketbuild.skipBenchmarkTasks=true
108+
--no-daemon
109+
110+
- run: >
111+
./gradlew
112+
ktorTcpRequestStreamBenchmark
113+
ktorWsRequestStreamBenchmark
114+
nettyTcpRequestStreamBenchmark
115+
nettyQuicRequestStreamBenchmark
116+
--no-parallel
117+
--max-workers=1
118+
--no-daemon
119+
--continue
120+
121+
- if: always() && !cancelled()
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: benchmark-reports-network-rs-${{ matrix.os }}
125+
path: "rsocket-transport-benchmarks/**/build/reports/benchmarks/**/*.csv"
126+
retention-days: 7
127+
128+
benchmark-network-rc:
129+
runs-on: ${{ matrix.os }}
130+
strategy:
131+
fail-fast: false
132+
matrix:
133+
os: [ ubuntu-latest, macos-latest ]
134+
steps:
135+
- uses: actions/checkout@v4
136+
- uses: ./.github/actions/setup-gradle
137+
138+
- run: >
139+
./gradlew
140+
ktorTcpRequestChannelBenchmark
141+
ktorWsRequestChannelBenchmark
142+
nettyTcpRequestChannelBenchmark
143+
nettyQuicRequestChannelBenchmark
144+
-Prsocketbuild.skipBenchmarkTasks=true
145+
--no-daemon
146+
147+
- run: >
148+
./gradlew
149+
ktorTcpRequestChannelBenchmark
150+
ktorWsRequestChannelBenchmark
151+
nettyTcpRequestChannelBenchmark
152+
nettyQuicRequestChannelBenchmark
153+
--no-parallel
154+
--max-workers=1
155+
--no-daemon
156+
--continue
157+
158+
- if: always() && !cancelled()
159+
uses: actions/upload-artifact@v4
160+
with:
161+
name: benchmark-reports-network-rc-${{ matrix.os }}
162+
path: "rsocket-transport-benchmarks/**/build/reports/benchmarks/**/*.csv"
163+
retention-days: 7

benchmarks/build.gradle.kts

-116
This file was deleted.

0 commit comments

Comments
 (0)