Merge pull request #6334 from opentripplanner/renovate/graphql-16.x #2549
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: Performance test | |
on: | |
push: | |
branches: | |
- dev-2.x | |
jobs: | |
perf-test: | |
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for') && !startsWith(github.event.head_commit.message ,'Upgrade debug client to version') | |
runs-on: performance-test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Profiles | |
# | |
# The profile variable is used to filter out some locations when the speed test is run | |
# on a branch during development. | |
# | |
# - locations with the 'core' profile are always run (even when on a branch) | |
# - locations with the 'extended' profile are only run after merging to dev-2.x | |
- location: germany # all of Germany (500k stops, 200k patterns) but no OSM | |
iterations: 1 | |
jfr-delay: "50s" | |
profile: core | |
- location: norway | |
iterations: 4 | |
jfr-delay: "35s" | |
profile: core | |
- location: skanetrafiken | |
iterations: 1 | |
jfr-delay: "50s" | |
profile: core | |
# extended locations that are run only after merging to dev-2.x | |
- location: hamburg # German city | |
iterations: 1 | |
jfr-delay: "50s" | |
profile: extended | |
- location: baden-wuerttemberg # German state of Baden-Württemberg: https://en.wikipedia.org/wiki/Baden-W%C3%BCrttemberg | |
iterations: 1 | |
jfr-delay: "50s" | |
profile: extended | |
- location: switzerland | |
iterations: 1 | |
jfr-delay: "50s" | |
profile: extended | |
- location: washington-state | |
iterations: 1 | |
jfr-delay: "20s" | |
profile: extended | |
steps: | |
- uses: actions/checkout@v4 | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
timeout-minutes: 5 | |
- name: Set up Maven | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.8.2 | |
- name: Build jar | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
env: | |
MAVEN_OPTS: "-Dmaven.repo.local=/home/lenni/.m2/repository/" | |
run: mvn -DskipTests --batch-mode install -P prettierSkip | |
- name: Build graph | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
run: | | |
cp otp-shaded/target/otp-shaded-*-SNAPSHOT.jar otp.jar | |
java -Xmx32G -jar otp.jar --build --save test/performance/${{ matrix.location }}/ | |
- name: Run speed test | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
env: | |
PERFORMANCE_INFLUX_DB_PASSWORD: ${{ secrets.PERFORMANCE_INFLUX_DB_PASSWORD }} | |
SPEEDTEST_LOCATION: ${{ matrix.location }} | |
MAVEN_OPTS: "-Xmx50g -XX:StartFlightRecording=delay=${{ matrix.jfr-delay }},duration=30m,filename=${{ matrix.location}}-speed-test.jfr -Dmaven.repo.local=/home/lenni/.m2/repository/" | |
run: | | |
mvn --projects application exec:java -Dexec.mainClass="org.opentripplanner.transit.speed_test.SpeedTest" -Dexec.classpathScope=test -Dexec.args="--dir=test/performance/${{ matrix.location }} -p md -n ${{ matrix.iterations }} -i 3 -0" | |
- name: Archive travel results file | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.location }}-travelSearch-results.csv | |
path: test/performance/${{ matrix.location }}/travelSearch-results-md.csv | |
- name: Archive Flight Recorder instrumentation file | |
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.location }}-flight-recorder | |
path: application/${{ matrix.location }}-speed-test.jfr |