This repository has been archived by the owner on May 9, 2023. It is now read-only.
forked from zio/zio-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (75 loc) · 2.76 KB
/
benchs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Inspired by Flavio W. Brasil's work on Kyo: https://github.com/fwbrasil/kyo
name: Benchs
on:
push:
branches:
- master
pull_request:
types: [ opened, reopened, synchronize ]
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark: # See https://github.com/marketplace/actions/continuous-benchmark
name: Run benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Use CI sbt jvmopts
shell: bash
run: |
mv .jvmopts .jvmopts_old
mv .jvmopts-ci .jvmopts
cat .jvmopts
- name: compile
run: sbt compile
- name: run benchmarks
# To list all possible options and undestand these configurations, see run `sbt "zioKafkaBench/Jmh/run -h"`
#
# Used options meaning:
# - "-wi 5": 5 warmup iterations
# - "-i 5": 5 benchmark iterations
# - "-r 1": Minimum time to spend at each measurement iteration. 1 second
# - "-w 1": Minimum time to spend at each warmup iteration. 1 second
# - "-t 1": Number of worker threads to run with. 1 thread
# - "-rf json": Format type for machine-readable results. JSON
# - "-foe true": Should JMH fail immediately if any benchmark had experienced an unrecoverable error?. True
# - "-to 60": 1 minute timeout per iteration
run: sbt "zioKafkaBench/Jmh/run -wi 5 -i 5 -r 1 -w 1 -t 1 -to 60 -rf json -foe true"
- name: Download previous benchmark data
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Rollback - Use CI sbt jvmopts
shell: bash
run: |
mv .jvmopts .jvmopts-ci
mv .jvmopts_old .jvmopts
cat .jvmopts
- name: Store benchmark result
uses: benchmark-action/[email protected]
with:
name: JMH Benchmark
tool: 'jmh'
output-file-path: zio-kafka-bench/jmh-result.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
# Mention these maintainers in the commit comment
alert-comment-cc-users: '@iravid,@svroonland,@guizmaii'