public synchronized void runAgent(final SingleConsole singleConsole,
									  final GrinderProperties grinderProperties,
									  final Set<AgentInfo> necessaryAgents) {
		ExecutorService execService = null;
		try {
			// Make the agents connect to console.
			grinderProperties.setInt(CONSOLE_PORT, singleConsole.getConsolePort());
			execService = createThreadPool("agentStarter", NUMBER_OF_THREAD);
			for (final AgentInfo agentInfo : necessaryAgents) {
				execService.submit(() -> agentControllerServerDaemon.startAgent(grinderProperties, agentInfo.getAgentIdentity()));
			}
		} finally {
			if (execService != null) {
				execService.shutdown();
			}
		}
	}
Assign the agents on the given console.

@param singleConsole     {@link SingleConsole} to which agents will be assigned
@param grinderProperties {@link GrinderProperties} to be distributed.
@param necessaryAgents   necessary agents for running test.
ngrinder-controller/src/main/java/org/ngrinder/perftest/service/AgentManager.java