Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added 5 jvm flag suggestions #3

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1cb1812
created baseline coverage report to use for identifying where unit te…
bcurrysharples Sep 30, 2024
6c84375
Update README.md
h-mbl Oct 3, 2024
889fdf1
update pom.xml
h-mbl Oct 5, 2024
0aa67eb
Update pom.xml
h-mbl Oct 5, 2024
f086d0c
Merge remote-tracking branch 'origin/master'
bcurrysharples Oct 5, 2024
0b3fb92
test coverage
h-mbl Oct 5, 2024
fb4f746
Update pom.xml
h-mbl Oct 5, 2024
add3122
test; added case where an empty string ("") is tested in `testCamelCa…
bcurrysharples Oct 5, 2024
42ae487
Merge remote-tracking branch 'origin/master'
bcurrysharples Oct 5, 2024
792a87f
coverage
h-mbl Oct 5, 2024
d515d8a
Merge branch 'master' of https://github.com/h-mbl/graphhopper
h-mbl Oct 5, 2024
4c82170
java-faker in CustomModelAreasDeserializerTest
h-mbl Oct 6, 2024
9655812
commentaires (intentions) ajoutés
bcurrysharples Oct 6, 2024
93c5cd7
CustomModel.addAreas avec ID invalide
h-mbl Oct 8, 2024
4746baf
Create ResponsePathTest.java
h-mbl Oct 8, 2024
d503a6f
CustomModelAreasDeserializerTest modification
h-mbl Oct 10, 2024
04ba8d4
testEmptyUnderscoreToEmptyCamelCase() et testEmptyCamelCaseToEmptyUnd…
bcurrysharples Oct 10, 2024
3571fe2
Merge remote-tracking branch 'origin/master'
bcurrysharples Oct 10, 2024
4741e92
Update ResponsePathTest.java
h-mbl Oct 10, 2024
af6b089
Merge branch 'master' of https://github.com/h-mbl/graphhopper
h-mbl Oct 10, 2024
862e03f
commentaire
h-mbl Oct 10, 2024
3470b53
fixed line
bcurrysharples Oct 10, 2024
f8e3f9b
Add files via upload
bcurrysharples Oct 10, 2024
c0ec544
print flag
h-mbl Nov 7, 2024
3f89c21
test_flags
h-mbl Nov 9, 2024
bfc3ece
Update test.yml
h-mbl Nov 9, 2024
9306495
generate report.md
h-mbl Nov 9, 2024
d403d7a
version 3
h-mbl Nov 9, 2024
a6f7f2c
Update test.yml
h-mbl Nov 9, 2024
7feb432
Update test.yml
h-mbl Nov 9, 2024
9923bb0
Created jvmFlags.yml
bcurrysharples Nov 12, 2024
458c4bb
fixed formatting jvmFlags.yml
bcurrysharples Nov 12, 2024
c1c03f0
updated jvmFlags.yml to run for all pushes (not just on Brittany branch)
bcurrysharples Nov 12, 2024
05b5cd6
forgot `unset MAVEN_OPTS` in jvmFlags.yml
bcurrysharples Nov 12, 2024
4cb2e5b
is lolcommits working?
bcurrysharples Nov 11, 2024
b96e269
commit config.yml
bcurrysharples Nov 12, 2024
a24d4a2
changed flag #3
bcurrysharples Nov 12, 2024
7a91813
suppression generateur rapport
h-mbl Nov 12, 2024
c0995d5
test new github action
bcurrysharples Nov 12, 2024
132e7b4
should say which flag is running now
bcurrysharples Nov 12, 2024
bdae84e
added 5 flags (mix of my proposals & hervé's )
bcurrysharples Nov 12, 2024
f9ff501
added print of flag category to log
bcurrysharples Nov 12, 2024
4ddc870
Display JVM Flags Documentation bloc
h-mbl Nov 12, 2024
e979692
added category and description to -XX:+OptimizeFill flag
bcurrysharples Nov 12, 2024
c96cce9
Add files via upload
bcurrysharples Nov 12, 2024
d7e5aea
Add files via upload
bcurrysharples Nov 12, 2024
da8e961
Merge pull request #1 from bcurrysharples/master
h-mbl Nov 13, 2024
df3b284
revert test.yml
h-mbl Nov 14, 2024
6ef0274
add documentation
h-mbl Nov 14, 2024
2d20572
Revert "add documentation"
h-mbl Nov 14, 2024
6304869
Add files via upload
bcurrysharples Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
108 changes: 108 additions & 0 deletions .github/workflows/build-test-jvmFlags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build, Test and JVM Flags
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java-version: [ 22 ]
flags:
- category: "Insert Here"
flag: -XX:CompilerThreshold=1000
description: "Optimizes frequently used methods by lowering the compilation threshold, improving performance of core routing operations"

- category: "Insert Here"
flag: -XX:+UseCompressedOops
description: "enables compressed ordinary object pointers"

- category: "Optimisation du mémoire et performance"
flag: -XX:+OptimizeFill
description: "Optimise le remplissage de la mémoire inutilisée dans les objets."

- category: "Insert Here"
flag: -XX:+UseZGC
description: "enables the Z Garbage Collector"

- category: "Insert Here"
flag: -XX:MaxInlineLevel=<value>
description: "sets the maximum depth for method inlining by the JIT compiler."
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Cache Maven artifacts
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache node
uses: actions/cache@v3
with:
path: web-bundle/node
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os}}-node-
- name: Cache node_modules
uses: actions/cache@v3
with:
path: web-bundle/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }}
restore-keys: |
${{ runner.os}}-node_modules-
- name: Running JVM Flag ${{matrix.flags.flag}}
run: |
unset MAVEN_OPTS
echo "Category: ${{matrix.flags.category}}"
echo "JVM Flag: ${{matrix.flags.flag}}"
echo "Description: ${{matrix.flags.description}}"
export MAVEN_OPTS="${{matrix.flags.flag}}"

- name: Build ${{ matrix.java-version }}
run: mvn -B clean verify

- name: Get JaCoCo Coverage
id: COVERAGE
run: |
coverage1=$(python3 config/coverage.py core/target/site/jacoco/jacoco.csv)
echo "COVERAGE1=$coverage1" >> $GITHUB_ENV
coverage2=$(python3 config/coverage.py reader-gtfs/target/site/jacoco/jacoco.csv)
echo "COVERAGE2=$coverage2" >> $GITHUB_ENV
coverage3=$(python3 config/coverage.py web/target/site/jacoco/jacoco.csv)
echo "COVERAGE3=$coverage3" >> $GITHUB_ENV
coverage4=$(python3 config/coverage.py web-api/target/site/jacoco/jacoco.csv)
echo "COVERAGE4=$coverage4" >> $GITHUB_ENV
coverage5=$(python3 config/coverage.py navigation/target/site/jacoco/jacoco.csv)
echo "COVERAGE5=$coverage5" >> $GITHUB_ENV
coverage6=$(python3 config/coverage.py client-hc/target/site/jacoco/jacoco.csv)
echo "COVERAGE6=$coverage6" >> $GITHUB_ENV
- name: Fail if coverage has not improved.
run: |
threshold1=83.75
threshold2=46.63
threshold3=20.45
threshold4=37.53
threshold5=81.89
threshold6=52.88
if (( $(echo "$COVERAGE1 - $threshold1 <= 0.1" | bc -l) )); then
echo "New coverage for the module core - $COVERAGE1%. Coverage is improved!"
elif (( $(echo "$COVERAGE2 - $threshold2 <= 0.1" | bc -l) )); then
echo "New coverage for the module reader-gtfs - $COVERAGE2%. Coverage is improved!"
elif (( $(echo "$COVERAGE3 - $threshold3 <= 0.1" | bc -l) )); then
echo "New coverage for module web - $COVERAGE3%. Coverage is improved!"
elif (( $(echo "$COVERAGE4 - $threshold4 <= 0.1" | bc -l) )); then
echo "New coverage for module web-api - $COVERAGE4%. Coverage is improved!"
elif (( $(echo "$COVERAGE5 - $threshold5 <= 0.1" | bc -l) )); then
echo "New coverage for module navigation - $COVERAGE5%. Coverage is improved!"
elif (( $(echo "$COVERAGE6 - $threshold6 <= 0.1" | bc -l) )); then
echo "New coverage for module client-hc - $COVERAGE6%. Coverage is improved!"
else
echo "Coverage is not improved."
exit 1
fi
96 changes: 96 additions & 0 deletions .github/workflows/jvmFlagsOriginal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: JVM Flags

on:
push:
pull_request:

jobs:

flag_1:
runs-on: ubuntu-latest
steps:
# clones the repo at job start
- uses: actions/checkout@v3
# set-up Java 22 for build
- uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
- name: test flag 1
# `|` sequentially runs commands on multiple lines
# `unset MAVEN_OPTS` removes previous flags
# `echo` prints
# `export` makes `MAVEN_OPTS` available to `clean` & `verify`
# `MAVEN_OPTS = JVM flag` sets the flag for each job
# `clean` removes previously compiled files
# `verify` checks build is correct
run: |
unset MAVEN_OPTS
echo 'JVM Flag 1: -XX:+UseCompressedOops'
echo 'Randomly choosen from the server side article'
export MAVEN_OPTS='-XX:+UseCompressedOops'
mvn clean verify

flag_2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
- name: test flag 2
run: |
unset MAVEN_OPTS
echo 'JVM Flag 2: -XX:+UseZGC'
echo 'Randomly choosen from the server side article'
export MAVEN_OPTS='-XX:+UseZGC'
mvn clean verify

flag_3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
- name: test flag 3
run: |
unset MAVEN_OPTS
echo 'JVM Flag 3: '
echo 'Randomly choosen from the server side article'
export MAVEN_OPTS=''
mvn clean verify

flag_4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
- name: test flag 4
run: |
unset MAVEN_OPTS
echo 'JVM Flag 4: '
echo 'Randomly choosen from the server side article'
export MAVEN_OPTS=''
mvn clean verify

flag_5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
- name: test flag 5
run: |
unset MAVEN_OPTS
echo 'JVM Flag 5: '
echo 'Randomly choosen from the server side article'
export MAVEN_OPTS=''
mvn clean verify
3 changes: 3 additions & 0 deletions .lolcommits/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Capture:capture:
delay: 2
device: "FaceTime HD Camera"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GraphHopper Routing Engine



![Build Status](https://github.com/graphhopper/graphhopper/actions/workflows/build.yml/badge.svg?branch=master)

GraphHopper is a fast and memory-efficient routing engine released under Apache License 2.0.
Expand Down
18 changes: 18 additions & 0 deletions checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Flags spécifiques pour GraphHopper -->
<module name="TreeWalker">
<!-- Vérification des conventions de nommage -->
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>
<!-- Flag pour la documentation -->
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="false"/>
<property name="allowMissingReturnTag" value="false"/>
</module>
</module>
</module>
6 changes: 6 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
<build>
<pluginManagement>
<plugins>
<!-- new -->
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>LATEST</version>
</plugin>
<!-- create jar with test classes to be reused in other projects -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading