Skip to content

Merge pull request #6029 from entur/introduce_real_time_update_context #2295

Merge pull request #6029 from entur/introduce_real_time_update_context

Merge pull request #6029 from entur/introduce_real_time_update_context #2295

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 package -P prettierSkip
- name: Build graph
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
run: |
cp target/otp-*-SNAPSHOT-shaded.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 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" -P prettierSkip
- 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.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: ${{ matrix.location}}-speed-test.jfr