Skip to content

Commit

Permalink
tps测试
Browse files Browse the repository at this point in the history
  • Loading branch information
jwpttcg66 committed Apr 20, 2017
1 parent 0501b00 commit a3558e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@ public class UpdateExecutorService implements IUpdateExcutor{
private NonOrderedQueuePoolExecutor nonOrderedQueuePoolExecutor;


public UpdateExecutorService(int corePoolSize, long keepAliveTime, TimeUnit unit) {
// super(corePoolSize, Integer.MAX_VALUE, keepAliveTime, unit, new LinkedBlockingDeque<Runnable>(),
// new ThreadNameFactory(Constants.Thread.UPDATE));
public UpdateExecutorService(int corePoolSize) {
nonOrderedQueuePoolExecutor = new NonOrderedQueuePoolExecutor(corePoolSize);
}

// public UpdateExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler rejectedExecutionHandler) {
// super(corePoolSize, maximumPoolSize, keepAliveTime, unit, new LinkedBlockingDeque<Runnable>(),
// new ThreadNameFactory(Constants.Thread.UPDATE),rejectedExecutionHandler);
// }

@Override
public void excutorUpdate(DispatchThread dispatchThread, IUpdate iUpdate, boolean firstFlag, int updateExcutorIndex) {
LockSupportUpdateFuture lockSupportUpdateFuture = new LockSupportUpdateFuture(dispatchThread);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public static void testEvent() throws Exception {
// int corePoolSize = 100;
int maxSize = 20000;
int corePoolSize = 50;
long keepAliveTime = 0;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
UpdateExecutorService updateExecutorService = new UpdateExecutorService(corePoolSize, keepAliveTime, timeUnit);
UpdateExecutorService updateExecutorService = new UpdateExecutorService(corePoolSize);
int cycleSleepTime = 1000 / Constants.cycle.cycleSize;
LockSupportDisptachThread dispatchThread = new LockSupportDisptachThread(updateEventBus, updateExecutorService
, cycleSleepTime, cycleSleepTime * 1000000);
Expand Down

0 comments on commit a3558e8

Please sign in to comment.