Skip to content

Commit

Permalink
Only commit benchmark results to master folder
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN committed Dec 12, 2020
1 parent 91bfc9a commit a1cf732
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
- 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'
run: >-
jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
| if .[0].benchmarks == null then null else .[0] end'
**/**/tests/*${{ matrix.package }}*-benchmark.json > output.json
- 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'
uses: rhysd/github-action-benchmark@v1
with:
Expand All @@ -79,7 +79,7 @@ jobs:
fail-on-alert: true
# Make a commit on `gh-pages` with benchmarks from previous step
auto-push: ${{ github.ref == 'refs/heads/master' }}
gh-pages-branch: master
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks
misc:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changelog
All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file. Test

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for more detail on available tox commands.

### 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.

Expand Down
4 changes: 4 additions & 0 deletions docs/performance/benchmarks.rst
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit a1cf732

Please sign in to comment.