diff --git a/src/main/java/com/snowcattle/game/executor/common/utils/Constants.java b/src/main/java/com/snowcattle/game/executor/common/utils/Constants.java index 4e07c75..f4c40ea 100644 --- a/src/main/java/com/snowcattle/game/executor/common/utils/Constants.java +++ b/src/main/java/com/snowcattle/game/executor/common/utils/Constants.java @@ -28,6 +28,7 @@ public static class Thread{ public static final String DISPATCH="dispatch"; public static final String UpdateNotifyService="UpdateNotifyService"; public static final String BindThreadUpdateExecutorService="BindThreadUpdateExecutorService"; + public static final String UpdateExecutorService="UpdateExecutorService"; } /** diff --git a/src/main/java/com/snowcattle/game/executor/update/pool/UpdateExecutorService.java b/src/main/java/com/snowcattle/game/executor/update/pool/UpdateExecutorService.java index 3d6774e..6f4c608 100644 --- a/src/main/java/com/snowcattle/game/executor/update/pool/UpdateExecutorService.java +++ b/src/main/java/com/snowcattle/game/executor/update/pool/UpdateExecutorService.java @@ -1,5 +1,6 @@ package com.snowcattle.game.executor.update.pool; +import com.snowcattle.game.executor.common.utils.Constants; import com.snowcattle.game.executor.update.thread.dispatch.DispatchThread; import com.snowcattle.game.executor.update.thread.update.LockSupportUpdateFuture; import com.snowcattle.game.executor.update.thread.update.LockSupportUpdateFutureThread; @@ -20,7 +21,7 @@ public class UpdateExecutorService implements IUpdateExecutor { public UpdateExecutorService(int corePoolSize) { - nonOrderedQueuePoolExecutor = new NonOrderedQueuePoolExecutor(corePoolSize); + nonOrderedQueuePoolExecutor = new NonOrderedQueuePoolExecutor(Constants.Thread.UpdateExecutorService, corePoolSize); } @Override diff --git a/src/test/java/com/snowcattle/game/executor/update/async/AsyncUpdateBusTest.java b/src/test/java/com/snowcattle/game/executor/update/async/AsyncUpdateBusTest.java index 76a7d03..d726751 100644 --- a/src/test/java/com/snowcattle/game/executor/update/async/AsyncUpdateBusTest.java +++ b/src/test/java/com/snowcattle/game/executor/update/async/AsyncUpdateBusTest.java @@ -27,7 +27,7 @@ public static void testUpdate() throws Exception { EventBus updateEventBus = new EventBus(); // int maxSize = 10000; // int corePoolSize = 100; - int maxSize = 20000; + int maxSize = 2000; int corePoolSize = 50; UpdateExecutorService updateExecutorService = new UpdateExecutorService(corePoolSize); int cycleSleepTime = 1000 / Constants.cycle.cycleSize; diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties index f208030..f8ed8cc 100644 --- a/src/test/resources/log4j.properties +++ b/src/test/resources/log4j.properties @@ -1,6 +1,6 @@ -log4j.rootLogger=info,stdout,error +log4j.rootLogger=debug,stdout,error log4j.logger.gameExcutorUtil=debug,gameExcutorUtil -log4j.logger.gameExcutorError=info,gameExcutorError +log4j.logger.gameExcutorError=debug,gameExcutorError #--------------------stdout-------------------------------- log4j.appender.stdout=org.apache.log4j.ConsoleAppender