Remove additional_build_steps_*.sh support (#301)
There is no need to have it as preparation steps could be fit into prepare_*.sh
This commit is contained in:
parent
8602a35504
commit
c9183a5aeb
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Copyright 2023 The original authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
sdk use java 21.0.1-graal 1>&2
|
|
||||||
NATIVE_IMAGE_OPTS="--gc=epsilon -O3 -march=native --enable-preview"
|
|
||||||
native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o image_calculateaverage_thomaswue dev.morling.onebrc.CalculateAverage_thomaswue
|
|
@ -15,13 +15,12 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if [ -f target/CalculateAverage_thomaswue_image ]; then
|
||||||
if [ -f ./image_calculateaverage_thomaswue ]; then
|
echo "Picking up existing native image 'target/CalculateAverage_thomaswue_image', delete the file to select JVM mode." 1>&2
|
||||||
echo "Picking up existing native image, delete the file to select JVM mode." 1>&2
|
target/CalculateAverage_thomaswue_image
|
||||||
./image_calculateaverage_thomaswue
|
|
||||||
else
|
else
|
||||||
JAVA_OPTS="--enable-preview"
|
JAVA_OPTS="--enable-preview"
|
||||||
echo "Chosing to run the app in JVM mode as no native image was found, use additional_build_step_thomaswue.sh to generate." 1>&2
|
echo "Chosing to run the app in JVM mode as no native image was found, use prepare_thomaswue.sh to generate." 1>&2
|
||||||
java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_thomaswue
|
java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage_thomaswue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
19
evaluate2.sh
19
evaluate2.sh
@ -20,8 +20,7 @@ set -eo pipefail
|
|||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "Usage: evaluate2.sh <fork name> (<fork name 2> ...)"
|
echo "Usage: evaluate2.sh <fork name> (<fork name 2> ...)"
|
||||||
echo " for each fork, there must be a 'prepare_<fork name>.sh' script and a 'calculate_average_<fork name>.sh' script"
|
echo " for each fork, there must be a 'calculate_average_<fork name>.sh' script and an optional 'prepare_<fork name>.sh'."
|
||||||
echo " there may be an 'additional_build_steps_<fork name>.sh' script too"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -132,12 +131,6 @@ for fork in "$@"; do
|
|||||||
sdk use java $DEFAULT_JAVA_VERSION
|
sdk use java $DEFAULT_JAVA_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Optional additional build steps
|
|
||||||
if [ -f "./additional_build_steps_$fork.sh" ]; then
|
|
||||||
echo "+ ./additional_build_steps_$fork.sh"
|
|
||||||
./additional_build_steps_$fork.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use hyperfine to run the benchmarks for each fork
|
# Use hyperfine to run the benchmarks for each fork
|
||||||
HYPERFINE_OPTS="--warmup 1 --runs 5 --export-json $fork-$filetimestamp-timing.json --output ./$fork-$filetimestamp.out"
|
HYPERFINE_OPTS="--warmup 1 --runs 5 --export-json $fork-$filetimestamp-timing.json --output ./$fork-$filetimestamp.out"
|
||||||
|
|
||||||
@ -236,15 +229,15 @@ for fork in "$@"; do
|
|||||||
|
|
||||||
# Read java version from prepare_$fork.sh if it exists, otherwise assume 21.0.1-open
|
# Read java version from prepare_$fork.sh if it exists, otherwise assume 21.0.1-open
|
||||||
java_version="21.0.1-open"
|
java_version="21.0.1-open"
|
||||||
if [ -f "./prepare_$fork.sh" ]; then
|
|
||||||
java_version=$(grep "sdk use java" ./prepare_$fork.sh | cut -d' ' -f4)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Hard-coding the note message for now
|
# Hard-coding the note message for now
|
||||||
notes=""
|
notes=""
|
||||||
if [ -f "./additional_build_steps_$fork.sh" ]; then
|
if [ -f "./prepare_$fork.sh" ]; then
|
||||||
|
java_version=$(grep -F "sdk use java" ./prepare_$fork.sh | cut -d' ' -f4)
|
||||||
|
|
||||||
|
if grep -F "native-image" -q ./prepare_$fork.sh ; then
|
||||||
notes="GraalVM native binary"
|
notes="GraalVM native binary"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "$trimmed_mean;" >> $leaderboard_temp_file # for sorting
|
echo -n "$trimmed_mean;" >> $leaderboard_temp_file # for sorting
|
||||||
echo -n "| # " >> $leaderboard_temp_file
|
echo -n "| # " >> $leaderboard_temp_file
|
||||||
|
@ -17,3 +17,9 @@
|
|||||||
|
|
||||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
sdk use java 21.0.1-graal 1>&2
|
sdk use java 21.0.1-graal 1>&2
|
||||||
|
|
||||||
|
# ./mvnw clean verify removes target/ and will re-trigger native image creation.
|
||||||
|
if [ ! -f target/CalculateAverage_thomaswue_image ]; then
|
||||||
|
NATIVE_IMAGE_OPTS="--gc=epsilon -O3 -march=native --enable-preview"
|
||||||
|
native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o target/CalculateAverage_thomaswue_image dev.morling.onebrc.CalculateAverage_thomaswue
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user