-
Notifications
You must be signed in to change notification settings - Fork 867
Add benchmarks workflow #3450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add benchmarks workflow #3450
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
538b063
Add benchmarks workflow
ocelotl 4df920f
Refactor to align better with JS
ocelotl fe11e59
Run tests in 3.11 only
ocelotl 56d7da1
Fix alert commit config
ocelotl a9cc01b
Merge branch 'main' into issue_3449
ocelotl 7d03199
Merge branch 'main' into issue_3449
ocelotl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: SDK Benchmark Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| sdk-benchmarks: | ||
| env: | ||
| py311: "3.11" | ||
| RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-sdk-${{ matrix.os }} | ||
| runs-on: self-hosted | ||
| strategy: | ||
| # Ensures the entire test matrix is run, even if one permutation fails | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: [py311] | ||
| os: [ubuntu-20.04, windows-2019] | ||
| steps: | ||
| - name: Checkout Core Repo @ SHA - ${{ github.sha }} | ||
| uses: actions/checkout@v2 | ||
| - name: Set up Python ${{ env[matrix.python-version] }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ env[matrix.python-version] }} | ||
| architecture: 'x64' | ||
| - name: Install tox | ||
| run: pip install tox==3.27.1 -U tox-factor | ||
|
ocelotl marked this conversation as resolved.
|
||
| - name: Cache tox environment | ||
| # Preserves .tox directory between runs for faster installs | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: | | ||
| .tox | ||
| ~/.cache/pip | ||
| key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', | ||
| 'dev-requirements.txt') }}-core | ||
| - name: Run tox | ||
| run: tox -f ${{ matrix.python-version }}-sdk -- -k opentelemetry-sdk/tests/performance/benchmarks --benchmark-json=output.json | ||
|
ocelotl marked this conversation as resolved.
|
||
| - name: Report on SDK benchmark results | ||
| uses: benchmark-action/github-action-benchmark@v1 | ||
| with: | ||
| name: OpenTelemetry Python SDK Benchmarks - Python ${{ env[matrix.python-version ]}} - SDK | ||
| tool: pytest | ||
| output-file-path: opentelemetry-sdk/tests/output.json | ||
| gh-pages-branch: benchmarks | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| # Make a commit on `gh-pages` with benchmarks from previous step | ||
| benchmark-data-dir-path: "benchmarks" | ||
| auto-push: true | ||
| max-items-in-chart: 100 | ||
| # Alert with a commit comment on possible performance regression | ||
|
ocelotl marked this conversation as resolved.
|
||
| alert-threshold: '200%' | ||
|
ocelotl marked this conversation as resolved.
|
||
| comment-on-alert: true | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.