public static <T, A extends Appendable> A runClient(WritableFactory testData,
ValidatorFactory validator, String route, boolean useTLS, boolean telemetry, int concurrentConnections,
int cyclesPerTrack, String host, int port, int timeoutMS, int inFlightBits, GraphManager graphUnderTest, A target) {
int tracks = Math.min(1+(concurrentConnections/(LIMITED_CONNECTIONS_PER_ACTOR+1)), CoresUtil.availableProcessors()*2);
ParallelClientLoadTesterConfig testerConfig = new ParallelClientLoadTesterConfig(tracks, cyclesPerTrack,
port, route, telemetry);
testerConfig.insecureClient = !useTLS;
testerConfig.host = host;
testerConfig.telemetryHost = "*.*.*.*";
testerConfig.simultaneousRequestsPerTrackBits = inFlightBits;
testerConfig.target = target;
testerConfig.graphUnderTest = graphUnderTest;
testerConfig.cycleRate = cycleRate;
testerConfig.sessionsPerTrack = (int)Math.ceil(concurrentConnections/(float)tracks);
logger.info("Tracks: {} SessionsPerTrack: {} TotalConnections: {}",tracks,testerConfig.sessionsPerTrack,tracks*testerConfig.sessionsPerTrack);
ParallelClientLoadTesterPayload payload = new ParallelClientLoadTesterPayload();
payload.post = testData;
payload.validator = validator;
GreenRuntime.testConcurrentUntilShutdownRequested(new ParallelClientLoadTester(testerConfig, payload), timeoutMS);
return target;
}