in client/src/main/java/com/google/cloud/solutions/opencensus/client/TestOptions.java [58:83]
static TestOptions parseArgs(String[] args) throws IllegalArgumentException {
if (args.length < 3) {
System.err.println("Only got " + args.length + " arguments");
System.out.println(USAGE);
throw new IllegalArgumentException();
}
String host = args[0];
int port = getInt("port", args[1]);
LOGGER.info("Setting host to " + host);
String targetURL = "http://" + host + ":" + port + "/test";
String bucket = args[2];
int nThreads = N_THREADS_DEFAULT;
if (args.length > 3) {
nThreads = getInt("nThreads", args[3]);
}
int httpTimeout = HTTP_TIMEOUT;
if (args.length > 4) {
httpTimeout = getInt("httpTimeout", args[4]);
}
int nIterations = N_ITERATIONS;
if (args.length > 5) {
nIterations = getInt("nIterations", args[5]);
}
return create(bucket, targetURL, nThreads, httpTimeout, nIterations);
}