String url = rest.get(0);
String storeName = rest.get(1);
Integer connsTotal = CmdUtils.valueOf(options, CONNECTIONS, 100);
Integer reqs = CmdUtils.valueOf(options, REQS, 1000);
ClientConfig config = new ClientConfig();
if(options.has(CONNECTION_TIMEOUT))
config.setConnectionTimeout((Integer) options.valueOf(CONNECTION_TIMEOUT),
TimeUnit.MILLISECONDS);
if(options.has(ROUTING_TIMEOUT))
config.setTimeoutConfig(new TimeoutConfig(TimeUnit.MILLISECONDS.toMillis((Integer) options.valueOf(ROUTING_TIMEOUT)),
false));
if(options.has(SOCKET_TIMEOUT))
config.setSocketTimeout((Integer) options.valueOf(SOCKET_TIMEOUT),
TimeUnit.MILLISECONDS);
if(options.has(MAX_CONNECTIONS))
config.setMaxConnectionsPerNode((Integer) options.valueOf(MAX_CONNECTIONS));
if(options.has(MAX_THREADS))
config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
if(options.has(SELECTORS))
config.setSelectors((Integer) options.valueOf(SELECTORS));
if(options.has(SOCKET_BUFFER_SIZE))
config.setSocketBufferSize((Integer) options.valueOf(SOCKET_BUFFER_SIZE));
config.setBootstrapUrls(url);
ClientConnectionStressTest test = new ClientConnectionStressTest(config,
storeName,
config.getMaxThreads(),
connsTotal,
reqs);
test.execute();
}