forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (124 loc) · 4.96 KB
/
load-tests.yml
File metadata and controls
131 lines (124 loc) · 4.96 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: load-tests
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
schedule:
- cron: "27 0,12 * * *" # Run at 00:27 and 12:27 UTC every day.
# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
permissions: read-all
jobs:
setup-environment:
timeout-minutes: 30
runs-on: oracle-bare-metal-64cpu-512gb-x86-64
if: ${{ github.actor != 'dependabot[bot]' && github.repository_owner == 'open-telemetry' }}
outputs:
loadtest_matrix: ${{ steps.splitloadtest.outputs.loadtest_matrix }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
id: go-setup
with:
go-version: oldstable
cache-dependency-path: "**/*.sum"
- name: Install dependencies
if: steps.go-setup.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-setup.outputs.cache-hit != 'true'
run: make install-tools
- run: make genoteltestbedcol
- run: make oteltestbedcol
- name: Upload Testbed Binaries
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: testbed-binaries
path: ./bin/*
- name: Split Loadtest Jobs
id: splitloadtest
run: ./.github/workflows/scripts/setup_e2e_tests.sh
loadtest:
runs-on: oracle-bare-metal-64cpu-512gb-x86-64
needs: [setup-environment]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-environment.outputs.loadtest_matrix) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
id: go-setup
with:
go-version: oldstable
cache-dependency-path: "**/*.sum"
- name: Install dependencies
if: steps.go-setup.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-setup.outputs.cache-hit != 'true'
run: make install-tools
- run: mkdir -p results && touch results/TESTRESULTS.md
- name: Download Testbed Binaries
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: testbed-binaries
path: bin/
- run: chmod +x bin/*
- name: Loadtest
run: make -C testbed run-tests
env:
TEST_ARGS: "-test.run=${{ matrix.test }}"
- name: Set results filename
if: ${{ failure() || success() }}
id: filename
run: echo "name=$(echo '${{ matrix.test }}' | sed -e 's/|/_/g')" >> "$GITHUB_OUTPUT"
- name: Create Test Result Archive
if: ${{ failure() || success() }}
continue-on-error: true
run: tar -cvf test_results_${{steps.filename.outputs.name}}.tar testbed/tests/results
- name: Upload Test Results
if: ${{ failure() || success() }}
continue-on-error: true
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: test-result-archive-${{steps.filename.outputs.name}}
path: ./*.tar
- run: cp testbed/tests/results/benchmarks.json testbed/tests/results/${{steps.filename.outputs.name}}.json
- name: Upload benchmarks.json
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: benchmark-results-${{steps.filename.outputs.name}}
path: testbed/tests/results/${{steps.filename.outputs.name}}.json
update-benchmarks:
runs-on: ubuntu-24.04
needs: [loadtest]
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
pattern: benchmark-results-*
merge-multiple: true
path: results
- run: jq -s 'map(.[])' results/*.json > output.json
- uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1
with:
tool: "customSmallerIsBetter"
output-file-path: output.json
gh-pages-branch: benchmarks
max-items-in-chart: 100
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmark-data-dir-path: "docs/benchmarks/loadtests"
auto-push: true