mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 04:34:01 +08:00
Only commit benchmark results to master folder (#250)
This commit is contained in:

committed by
GitHub

parent
e5a0153794
commit
4b830771d5
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@ -58,28 +58,27 @@ jobs:
|
|||||||
- name: run tox
|
- name: run tox
|
||||||
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
|
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
|
||||||
- name: Find and merge benchmarks
|
- name: Find and merge benchmarks
|
||||||
# TODO: Add at least one benchmark to every package type to remove this
|
# TODO: Add at least one benchmark to every package type to remove this (#249)
|
||||||
if: matrix.package == 'sdkextension'
|
if: matrix.package == 'sdkextension'
|
||||||
run: >-
|
run: >-
|
||||||
jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
|
jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
|
||||||
| if .[0].benchmarks == null then null else .[0] end'
|
| if .[0].benchmarks == null then null else .[0] end'
|
||||||
**/**/tests/*${{ matrix.package }}*-benchmark.json > output.json
|
**/**/tests/*${{ matrix.package }}*-benchmark.json > output.json
|
||||||
- name: Report on benchmark results
|
- name: Report on benchmark results
|
||||||
# TODO: Add at least one benchmark to every package type to remove this
|
# TODO: Add at least one benchmark to every package type to remove this (#249)
|
||||||
if: matrix.package == 'sdkextension'
|
if: matrix.package == 'sdkextension'
|
||||||
uses: rhysd/github-action-benchmark@v1
|
uses: rhysd/github-action-benchmark@v1
|
||||||
with:
|
with:
|
||||||
name: OpenTelemetry Python Benchmarks - Python ${{ env[matrix.python-version ]}} - ${{ matrix.package-group }}
|
name: OpenTelemetry Python Benchmarks - Python ${{ env[matrix.python-version ]}} - ${{ matrix.package }}
|
||||||
tool: pytest
|
tool: pytest
|
||||||
output-file-path: output.json
|
output-file-path: output.json
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Alert with a commit comment on possible performance regression
|
# Alert with a commit comment on possible performance regression
|
||||||
alert-threshold: 200%
|
alert-threshold: 200%
|
||||||
comment-always: true
|
|
||||||
fail-on-alert: true
|
fail-on-alert: true
|
||||||
# Make a commit on `gh-pages` with benchmarks from previous step
|
# Make a commit on `gh-pages` with benchmarks from previous step
|
||||||
auto-push: ${{ github.ref == 'refs/heads/master' }}
|
auto-push: ${{ github.ref == 'refs/heads/master' }}
|
||||||
gh-pages-branch: master
|
gh-pages-branch: gh-pages
|
||||||
benchmark-data-dir-path: benchmarks
|
benchmark-data-dir-path: benchmarks
|
||||||
misc:
|
misc:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -51,7 +51,7 @@ for more detail on available tox commands.
|
|||||||
|
|
||||||
### Benchmarks
|
### Benchmarks
|
||||||
|
|
||||||
Performance progression of benchmarks for packages distributed by OpenTelemetry Python can be viewed as a [graph of throughput vs commit history](https://open-telemetry.github.io/opentelemetry-python-contrib/benchmarks/index.html). From this page, you can download a JSON file with the performance results.
|
Performance progression of benchmarks for packages distributed by OpenTelemetry Python can be viewed as a [graph of throughput vs commit history](https://opentelemetry-python-contrib.readthedocs.io/en/latest/performance/benchmarks.html). From the linked page, you can download a JSON file with the performance results.
|
||||||
|
|
||||||
Running the `tox` tests also runs the performance tests if any are available. Benchmarking tests are done with `pytest-benchmark` and they output a table with results to the console.
|
Running the `tox` tests also runs the performance tests if any are available. Benchmarking tests are done with `pytest-benchmark` and they output a table with results to the console.
|
||||||
|
|
||||||
|
4
docs/performance/benchmarks.rst
Normal file
4
docs/performance/benchmarks.rst
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Performance Tests - Benchmarks
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Click `here <https://open-telemetry.github.io/opentelemetry-python-contrib/benchmarks/index.html>_` to view the latest performance benchmarks for packages in this repo.
|
Reference in New Issue
Block a user