diff options
| author | Alexander Yastrebov <yastrebov.alex@gmail.com> | 2024-01-05 20:11:11 +0100 |
|---|---|---|
| committer | Gunnar Morling <gunnar.morling@googlemail.com> | 2024-01-05 20:14:07 +0100 |
| commit | 398926028525362b20f7115e313e40bede630c04 (patch) | |
| tree | 74c52aa7bda9c741a7bfcdb640cdd57ab7b23f14 | |
| parent | 133a89088a5743d2eebbccbc474636b849e0b987 (diff) | |
Add example of how to use sdk
| -rw-r--r-- | README.md | 1 | ||||
| -rwxr-xr-x | calculate_average_baseline.sh | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -147,6 +147,7 @@ To submit your own implementation to 1BRC, follow these steps: * Make that implementation fast. Really fast. * Create a copy of _calculate_average_baseline.sh_, named _calculate\_average\_<your_GH_user>.sh_, e.g. _calculate\_average\_doloreswilson.sh_. * Adjust that script so that it references your implementation class name. If needed, provide any JVM arguments via the `JAVA_OPTS` variable in that script. + Make sure that script does not write anything to standard output other than calculation results. * OpenJDK 21 is the default. If a custom JDK build is required, include the SDKMAN command `sdk use java [version]` in the launch shell script prior to application start. * (Optional) If you'd like to use native binaries (GraalVM), adjust the _pom.xml_ file so that it builds that binary. * Run the test suite by executing _/test.sh <your_GH_user>_; if any differences are reported, fix them before submitting your implementation. diff --git a/calculate_average_baseline.sh b/calculate_average_baseline.sh index 5d36397..2428423 100755 --- a/calculate_average_baseline.sh +++ b/calculate_average_baseline.sh @@ -15,6 +15,9 @@ # limitations under the License. # +# Uncomment below to use sdk +# source "$HOME/.sdkman/bin/sdkman-init.sh" +# sdk use java 21.0.1-graal 1>&2 JAVA_OPTS="" time java $JAVA_OPTS --class-path target/average-1.0.0-SNAPSHOT.jar dev.morling.onebrc.CalculateAverage |
