diff options
| author | Jason Nochlin <91577+hundredwatt@users.noreply.github.com> | 2024-01-22 01:20:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-22 09:20:26 +0100 |
| commit | b374643a1f2ca938063c006f5c37668383ebb088 (patch) | |
| tree | fbbf0202a106116d2ee41a48839bc09325b34126 /evaluate.sh | |
| parent | d2639b7ce144ab453e36a36fb6dd3ecf19ed5123 (diff) | |
evaluate.sh: Add note for "using Unsafe" (#547)
* fix typo
* automatically label entries using Unsafe
* fix for entry in src/main/java-22/
* backfill leaderboard
---------
Co-authored-by: Jason Nochlin <hundredwatt@users.noreply.github.com>
Diffstat (limited to 'evaluate.sh')
| -rwxr-xr-x | evaluate.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/evaluate.sh b/evaluate.sh index caafbb1..c0be8b5 100755 --- a/evaluate.sh +++ b/evaluate.sh @@ -19,7 +19,7 @@ set -eo pipefail if [ -z "$1" ] then - echo "Usage: evaluate2.sh <fork name> (<fork name 2> ...)" + echo "Usage: evaluate.sh <fork name> (<fork name 2> ...)" echo " for each fork, there must be a 'calculate_average_<fork name>.sh' script and an optional 'prepare_<fork name>.sh'." exit 1 fi @@ -271,6 +271,12 @@ for fork in "$@"; do fi fi + # check if Java source file uses Unsafe + if grep -F "theUnsafe" -q ./src/main/java*/dev/morling/onebrc/CalculateAverage_$fork.java ; then + # if notes is not empty, append a comma and space before the unsafe note + notes="${notes:+$notes, }uses Unsafe" + fi + echo -n "$trimmed_mean;" >> $leaderboard_temp_file # for sorting echo -n "| # " >> $leaderboard_temp_file echo -n "| $trimmed_mean_formatted " >> $leaderboard_temp_file |
