From 8ba8627281954ebf68c2ebf3981f170c1c24320f Mon Sep 17 00:00:00 2001 From: RePixelatedMC Date: Sat, 28 Oct 2023 20:51:32 +0200 Subject: [PATCH] Improved pack Benchmarking not done yet.. --- build.gradle | 2 +- .../iris/core/tools/IrisPackBenchmarking.java | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index ca4a20b5b..40b156d77 100644 --- a/build.gradle +++ b/build.gradle @@ -295,7 +295,7 @@ if (JavaVersion.current().toString() != "17") { task iris(type: Copy) { group "iris" - from new File(buildDir, "Iris-${version}.jar") + from new File(buildDir, "libs/Iris-${version}.jar") into buildDir dependsOn(build) } diff --git a/core/src/main/java/com/volmit/iris/core/tools/IrisPackBenchmarking.java b/core/src/main/java/com/volmit/iris/core/tools/IrisPackBenchmarking.java index 4bbc2aba1..ef454e30b 100644 --- a/core/src/main/java/com/volmit/iris/core/tools/IrisPackBenchmarking.java +++ b/core/src/main/java/com/volmit/iris/core/tools/IrisPackBenchmarking.java @@ -3,6 +3,7 @@ package com.volmit.iris.core.tools; import com.volmit.iris.Iris; import com.volmit.iris.core.pregenerator.IrisPregenerator; +import com.volmit.iris.core.pregenerator.LazyPregenerator; import com.volmit.iris.core.pregenerator.PregenTask; import com.volmit.iris.util.exceptions.IrisException; import com.volmit.iris.util.format.C; @@ -87,8 +88,6 @@ public class IrisPackBenchmarking { while (true) { totalChunks = IrisPregenerator.getLongTotalChunks(); generatedChunks = IrisPregenerator.getLongGeneratedChunks(); - Iris.info("TEST: "+ totalChunks); - Iris.info("TEST2: "+ generatedChunks); if(totalChunks > 0) { if (generatedChunks >= totalChunks) { Iris.info("Benchmark Completed!"); @@ -123,6 +122,21 @@ public class IrisPackBenchmarking { .build(), Bukkit.getWorld("Benchmark") ); } + static void startLazyBenchmark(){ + int x = 0; + int z = 0; + LazyPregenerator.LazyPregenJob pregenJob = LazyPregenerator.LazyPregenJob.builder() + .world("Benchmark") + .healingPosition(0) + .healing(false) + .chunksPerMinute(3200) + .radiusBlocks(5000) + .position(0) + .build(); + + LazyPregenerator pregenerator = new LazyPregenerator(pregenJob, new File("plugins/Iris/lazygen.json")); + pregenerator.start(); + } public static double calculateAverageCPS() { double elapsedTimeSec = elapsedTimeNs / 1_000_000_000.0; // Convert to seconds return generatedChunks / elapsedTimeSec;