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
#Sat Mar 23 19:48:52 EDT 2024
buildNumber=82
#Sun Mar 24 15:51:37 EDT 2024
buildNumber=83

View File

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

View File

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

View File

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