diff options
| author | Elliot Barlas <elliotbarlas@gmail.com> | 2024-01-31 13:12:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-31 22:12:35 +0100 |
| commit | a11e5a12470c8c5edad09622f3d23b660853798b (patch) | |
| tree | 038387150b8638eacc5beb50dd26b4a2bd150a98 /calculate_average_ebarlas.sh | |
| parent | e639e2a045371ab0be51404767a42f22f689cf2c (diff) | |
Use GraalVM native image for ebarlas submission. (#698)
Diffstat (limited to 'calculate_average_ebarlas.sh')
| -rwxr-xr-x | calculate_average_ebarlas.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/calculate_average_ebarlas.sh b/calculate_average_ebarlas.sh index 2bd59d4..c73cb1a 100755 --- a/calculate_average_ebarlas.sh +++ b/calculate_average_ebarlas.sh @@ -15,5 +15,10 @@ # limitations under the License. # -JAVA_OPTS="--enable-preview" -java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_ebarlas +if [ -f target/CalculateAverage_ebarlas_image ]; then + echo "Picking up existing native image 'target/CalculateAverage_ebarlas_image', delete the file to select JVM mode." 1>&2 + target/CalculateAverage_ebarlas_image +else + echo "Choosing to run the app in JVM mode as no native image was found, use prepare_ebarlas.sh to generate." 1>&2 + java --enable-preview --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_ebarlas +fi |
