-
Notifications
You must be signed in to change notification settings - Fork 145
58 lines (51 loc) · 1.93 KB
/
benchmark.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
name: benchmark
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- run: sed -i 's/TRACE/INFO/g' clickhouse-native-jdbc/src/test/resources/simplelogger.properties
- run: sed -i 's/DEBUG/INFO/g' clickhouse-native-jdbc/src/test/resources/simplelogger.properties
- name: Install libasyncProfiler (remove this once async-profiler available on maven-central)
run: |
wget -O /tmp/async-profiler-1.8.3-linux-x64.tar.gz \
https://github.com/jvm-profiling-tools/async-profiler/releases/download/v1.8.3/async-profiler-1.8.3-linux-x64.tar.gz
tar -C /tmp -xzf /tmp/async-profiler-1.8.3-linux-x64.tar.gz
- name: Run benchmarks
env:
NETTY_RESOURCE_LEAK_DETECT_LEVEL: DISABLED
run: |
mvn -B -Pbenchmark clean integration-test -DskipITs -pl :clickhouse-native-jdbc -am | tee output.log
echo "BENCHMARK_REPORT<<EOF" >> $GITHUB_ENV
echo "`cat output.log | grep -E '^Benchmark\s.*\sUnits$' -A 300 | grep -E '.*\s(Units|ms/op)$'`" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: tar -czf benchmark-reports.tgz -C clickhouse-native-jdbc reports
- name: Upload reports
uses: actions/upload-artifact@v2
with:
name: benchmark-reports
path: benchmark-reports.tgz
retention-days: 30
- name: PR Comment
uses: github-actions-up-and-running/[email protected]
if: ${{ github.event_name == 'pull_request' }}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: |
<details>
<summary>BENCHMARK_REPORT</summary>
```
${{ env.BENCHMARK_REPORT }}
```
</details>