* @return The total number of agents configured
* @throws Exception Any error that could happen configuring the master
*/
protected int configure() throws Exception {
Registry registry = RegistryLocator.getRegistry();
int totalAgentCnt = 0;
// Get all agents for all drivers
for (int i = 0; i < benchDef.drivers.length && !runAborted; i++) {
// Only for drivers to run...
if (runInfo.driverConfigs[i].numAgents > 0) {
// Get all the agentImpl refs
String agentName = benchDef.drivers[i].name + "Agent";
Remote[] refs = registry.getServices(agentName);
int agentCnt;
// Usually, the agents should have been started
// according to the given number. But just in case
// some of them did not get started or there might