-
Notifications
You must be signed in to change notification settings - Fork 1k
81 lines (70 loc) · 2.59 KB
/
Copy pathbenchmark.yml
File metadata and controls
81 lines (70 loc) · 2.59 KB
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
name: Benchmark Main
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
sdk-benchmark:
if: github.repository == 'open-telemetry/opentelemetry-java'
permissions:
contents: write # for git push to benchmarks branch
name: Benchmark SDK
runs-on: oracle-bare-metal-64cpu-1024gb-x86-64-ubuntu-24
container:
image: ubuntu:26.04@sha256:da6fc2be547864451aa253836dd926da33623312df4a9a243e35dc877c378a78
timeout-minutes: 120 # since there is only a single bare metal runner across all repos
steps:
- name: Install Git
run: |
apt-get update
apt-get install -y git
- name: Configure Git safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 25
- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true
- name: Run jmh
run: ./gradlew jmhJar
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
# TODO (jack-berg): Select or build appropriate benchmarks for other key areas:
# - Log SDK export
# - Trace SDK export
# - Metric SDK export
# - Noop implementation
- name: Run Benchmark
run: |
cd sdk/all/build
java -jar libs/opentelemetry-sdk-*-jmh.jar -rf json MetricRecordBenchmark SpanRecordBenchmark LogRecordBenchmark
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-bot.sh
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@4322e5726e6334590d251fc4f92bec0efafc45dc # v1.22.2
with:
tool: 'jmh'
output-file-path: sdk/all/build/jmh-result.json
gh-pages-branch: benchmarks
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmark-data-dir-path: "benchmarks"
auto-push: true
workflow-notification:
permissions:
issues: write
needs:
- sdk-benchmark
if: always()
uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@ad1959372f2919fcf2556d3a3d12ed5265c54209 # v0.16.0
with:
success: ${{ needs.sdk-benchmark.result == 'success' }}