private List<Target> getTargets(String connectionSpec, int numTargets) {
        List<Target> targets = new ArrayList<>(numTargets);
        for ( int i=0; i < numTargets; i++) {
            targets.add(supervisor.connect(new Spec(connectionSpec)));
        }
        return targets;
    }
This is used for testing and benchmarking rpc docsum interface.
time vespa-summary-benchmark file-containing-docids connectionspec summary-class repetitions threads
fx ' time vespa-summary-benchmark feed.xml tcp/localhost:19115 keyvaluesummary 10000 32'

@author baldersheim
vespaclient-java/src/main/java/com/yahoo/vespasummarybenchmark/VespaSummaryBenchmark.java