-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
736 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Gradle Publish to Maven Central | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Publish to Sonatype | ||
env: | ||
TAG_VERSION: ${{ github.ref_name }} | ||
run: | | ||
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Peula=true | ||
echo "Version: ${TAG_VERSION}" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Benchmark | ||
|
||
> Reminder: The benchmark is very simple, and should only be valued as a rough estimate. | ||
The tests were run against [`minestom-ce`](https://github.com/hollow-cube/minestom-ce) on 1.19.4 (`f13a7b49fa`), | ||
on a Macbook Pro (M1 Max). The source code of the test can be seen below. | ||
|
||
```java | ||
public class ScuffedBenchmark { | ||
public static void main(String[] args) throws Exception { | ||
MinecraftServer.init(); | ||
var instance = MinecraftServer.getInstanceManager().createInstanceContainer(); | ||
|
||
long start = System.nanoTime(); | ||
|
||
for (int iter = 0; iter < 10; iter++) { | ||
System.out.println("Starting iteration " + iter); | ||
// TNTLoader loader = new TNTLoader(new FileTNTSource(Path.of("src/test/resources/bench/bench.tnt"))); | ||
// AnvilLoader loader = new AnvilLoader(Path.of("src/test/resources/bench")); | ||
PolarLoader loader = new PolarLoader(PolarReader.read(Files.readAllBytes(Path.of("src/test/resources/bench.polar")))); | ||
for (int x = 0; x < 32; x++) { | ||
for (int z = 0; z < 32; z++) { | ||
loader.loadChunk(instance, 0, 0).join(); | ||
} | ||
} | ||
|
||
} | ||
|
||
long end = System.nanoTime(); | ||
System.out.println("Took " + (end - start) / 1_000_000_000.0 / 10.0 + " seconds/iter"); | ||
MinecraftServer.stopCleanly(); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.