forked from HSLdevcom/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 10
116 lines (97 loc) · 4.12 KB
/
performance-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Performance test
on:
push:
branches:
- dev-2.x
- otp2_raptor_ignore_neg_trip_times
jobs:
perf-test:
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for')
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/[email protected]
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
with:
fetch-depth: 0
- name: Set up JDK 17
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
timeout-minutes: 5
- name: Set up Maven
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
uses: stCarolas/[email protected]
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@v3
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@v3
with:
name: ${{ matrix.location }}-flight-recorder
path: ${{ matrix.location}}-speed-test.jfr