From ef4af966a14bf9de91d0d8c98be4faf801461bed Mon Sep 17 00:00:00 2001 From: Nathaniel Ruiz Nowell Date: Fri, 11 Dec 2020 11:30:50 -0800 Subject: [PATCH] Only commit benchmark results to master folder --- .github/workflows/test.yml | 6 +++--- CONTRIBUTING.md | 2 +- docs/performance/benchmarks.rst | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 docs/performance/benchmarks.rst diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 348914c92f..3462d4779c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 322631c577..ddb72dcaf3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/docs/performance/benchmarks.rst b/docs/performance/benchmarks.rst new file mode 100644 index 0000000000..428d5acbbb --- /dev/null +++ b/docs/performance/benchmarks.rst @@ -0,0 +1,4 @@ +Performance Tests - Benchmarks +============================== + +Click `here _` to view the latest performance benchmarks for packages in this repo.