attempt fix testing
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-03-24 15:51:49 -04:00
parent b86217a285
commit 38fc3068a7
4 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file #maven.buildNumber.plugin properties file
#Sat Mar 23 19:48:52 EDT 2024 #Sun Mar 24 15:51:37 EDT 2024
buildNumber=82 buildNumber=83

View File

@ -13,7 +13,7 @@ import org.lwjgl.util.remotery.Remotery;
public class Profiler { public class Profiler {
//controls whether to profile or not //controls whether to profile or not
public static final boolean PROFILE = true; public static boolean PROFILE = true;
//pointer to the global instance //pointer to the global instance
long pointer = -1; long pointer = -1;
@ -22,10 +22,12 @@ public class Profiler {
* Creates the profiler * Creates the profiler
*/ */
public Profiler(){ public Profiler(){
try(MemoryStack stack = MemoryStack.stackPush()){ if(PROFILE){
PointerBuffer allocBuffer = stack.mallocPointer(1); try(MemoryStack stack = MemoryStack.stackPush()){
Remotery.rmt_CreateGlobalInstance(allocBuffer); PointerBuffer allocBuffer = stack.mallocPointer(1);
pointer = allocBuffer.get(); Remotery.rmt_CreateGlobalInstance(allocBuffer);
pointer = allocBuffer.get();
}
} }
} }

View File

@ -6,6 +6,7 @@ import org.junit.Test;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.engine.Main; import electrosphere.engine.Main;
import electrosphere.engine.profiler.Profiler;
import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.creature.CreatureUtils;
import electrosphere.net.NetUtils; import electrosphere.net.NetUtils;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
@ -19,6 +20,7 @@ public class SpawningCreaturesTest {
Globals.RUN_CLIENT = true; Globals.RUN_CLIENT = true;
Globals.RUN_SERVER = true; Globals.RUN_SERVER = true;
Globals.HEADLESS = true; Globals.HEADLESS = true;
Profiler.PROFILE = false;
NetUtils.setPort(0); NetUtils.setPort(0);
Main.startUp(); Main.startUp();
} }

View File

@ -3,6 +3,7 @@ import org.junit.Test;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.engine.Main; import electrosphere.engine.Main;
import electrosphere.engine.profiler.Profiler;
import electrosphere.net.NetUtils; import electrosphere.net.NetUtils;
import junit.framework.TestCase; import junit.framework.TestCase;
@ -14,6 +15,7 @@ public class StartupTest extends TestCase {
Globals.RUN_CLIENT = false; Globals.RUN_CLIENT = false;
Globals.RUN_SERVER = true; Globals.RUN_SERVER = true;
Globals.HEADLESS = true; Globals.HEADLESS = true;
Profiler.PROFILE = false;
NetUtils.setPort(0); NetUtils.setPort(0);
Main.startUp(); Main.startUp();
Main.mainLoop(1); Main.mainLoop(1);