mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
Improved pack Benchmarking not done yet..
This commit is contained in:
+1
-1
@@ -295,7 +295,7 @@ if (JavaVersion.current().toString() != "17") {
|
|||||||
|
|
||||||
task iris(type: Copy) {
|
task iris(type: Copy) {
|
||||||
group "iris"
|
group "iris"
|
||||||
from new File(buildDir, "Iris-${version}.jar")
|
from new File(buildDir, "libs/Iris-${version}.jar")
|
||||||
into buildDir
|
into buildDir
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.volmit.iris.core.tools;
|
|||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.pregenerator.IrisPregenerator;
|
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.core.pregenerator.PregenTask;
|
||||||
import com.volmit.iris.util.exceptions.IrisException;
|
import com.volmit.iris.util.exceptions.IrisException;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
@@ -87,8 +88,6 @@ public class IrisPackBenchmarking {
|
|||||||
while (true) {
|
while (true) {
|
||||||
totalChunks = IrisPregenerator.getLongTotalChunks();
|
totalChunks = IrisPregenerator.getLongTotalChunks();
|
||||||
generatedChunks = IrisPregenerator.getLongGeneratedChunks();
|
generatedChunks = IrisPregenerator.getLongGeneratedChunks();
|
||||||
Iris.info("TEST: "+ totalChunks);
|
|
||||||
Iris.info("TEST2: "+ generatedChunks);
|
|
||||||
if(totalChunks > 0) {
|
if(totalChunks > 0) {
|
||||||
if (generatedChunks >= totalChunks) {
|
if (generatedChunks >= totalChunks) {
|
||||||
Iris.info("Benchmark Completed!");
|
Iris.info("Benchmark Completed!");
|
||||||
@@ -123,6 +122,21 @@ public class IrisPackBenchmarking {
|
|||||||
.build(), Bukkit.getWorld("Benchmark")
|
.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() {
|
public static double calculateAverageCPS() {
|
||||||
double elapsedTimeSec = elapsedTimeNs / 1_000_000_000.0; // Convert to seconds
|
double elapsedTimeSec = elapsedTimeNs / 1_000_000_000.0; // Convert to seconds
|
||||||
return generatedChunks / elapsedTimeSec;
|
return generatedChunks / elapsedTimeSec;
|
||||||
|
|||||||
Reference in New Issue
Block a user