Repository navigation
ci(deps): bump the all group with 2 updates #1765
Workflow file for this run
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
| name: benchmark | |
| # On every pull request, but only on push to main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| tags: | |
| - '*' | |
| pull_request: | |
| jobs: | |
| benchmark: | |
| if: github.repository == 'developmentseed/titiler' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Push benchmark results to gh-benchmarks branch | |
| pull-requests: write # Leave PR comments when benchmark regressions exceed alert threshold | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: install siege | |
| run: | | |
| sudo apt update | |
| sudo apt install --yes siege jq | |
| siege -C | |
| - name: Start containers | |
| run: docker compose -f "docker-compose.yml" up -d --build benchmark | |
| # Let's wait a bit to make sure the docker are up | |
| - name: Sleep for 10 seconds | |
| run: sleep 10s | |
| shell: bash | |
| - name: Run siege (WebMercator TMS) | |
| run: | | |
| siege --file .github/data/urls.txt -b -c 1 -r 100 --json-output 2>&1 | jq -c > results.json | |
| echo "Benchmark Results" | |
| cat results.json | jq | |
| echo "Parse Results" | |
| cat results.json | jq '{"name": "WebMercator elapsed_time", "unit": "s", "value": .elapsed_time}, {"name": "WebMercator data_transferred", "unit": "Megabytes", "value": .data_transferred}, {"name": "WebMercator response_time", "unit": "s", "value": .response_time}, {"name": "WebMercator longest_transaction", "unit": "s", "value": .longest_transaction}' > output.json | |
| - name: Run siege (WGS1984Quad TMS) | |
| run: | | |
| siege --file .github/data/urls_wgs84.txt -b -c 1 -r 100 --json-output 2>&1 | jq -c > results.json | |
| echo "Benchmark Results" | |
| cat results.json | jq | |
| echo "Parse Results" | |
| cat results.json | jq '{"name": "WGS1984Quad elapsed_time", "unit": "s", "value": .elapsed_time}, {"name": "WGS1984Quad data_transferred", "unit": "Megabytes", "value": .data_transferred}, {"name": "WGS1984Quad response_time", "unit": "s", "value": .response_time}, {"name": "WGS1984Quad longest_transaction", "unit": "s", "value": .longest_transaction}' >> output.json | |
| - name: Stop containers | |
| if: always() | |
| run: docker compose -f "docker-compose.yml" down | |
| - name: Merge Outputs | |
| run: | | |
| cat output.json | jq '[inputs]' > benchmark.json | |
| - name: Check and Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@4322e5726e6334590d251fc4f92bec0efafc45dc # v1 | |
| with: | |
| name: TiTiler performance Benchmarks | |
| tool: 'customSmallerIsBetter' | |
| output-file-path: benchmark.json | |
| alert-threshold: '130%' | |
| # Only comment on alert when we can actually write to the repository. | |
| # Pull requests from a fork get a read-only GITHUB_TOKEN, so posting the | |
| # alert comment fails with "Resource not accessible by integration" and | |
| # takes the whole job down, despite `fail-on-alert: false`. | |
| comment-on-alert: ${{ github.event.pull_request.head.repo.fork != true }} | |
| fail-on-alert: false | |
| # GitHub API token to make a commit comment | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| gh-pages-branch: 'gh-benchmarks' | |
| # Make a commit only if main | |
| auto-push: ${{ github.ref == 'refs/heads/main' }} |