sdk: try to make test_batch_span_processor_reset_timeout a bit less f… #8
This file contains 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
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@v4 | |
- name: Set up Python ${{ env[matrix.python-version] }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env[matrix.python-version] }} | |
architecture: 'x64' | |
- name: Install tox | |
run: pip install tox | |
- name: Cache tox environment | |
# Preserves .tox directory between runs for faster installs | |
uses: actions/cache@v4 | |
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=opentelemetry-sdk/tests/output.json | |
- 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: gh-pages | |
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 | |
alert-threshold: '200%' | |
comment-on-alert: true |