private static void fetchDocIds(String summaryClass, List<Target> targets, List<GlobalId> gids, boolean dump) {
        Slime docsumRequest = createDocsumRequest(summaryClass, gids);
        byte [] blob = BinaryFormat.encode(docsumRequest);
        Waiter waiter = new Waiter(targets.size(), dump);
        for (Target target : targets) {
            Request r = new Request("proton.getDocsums");
            r.parameters().add(new Int8Value(CompressionType.NONE.getCode()));
            r.parameters().add(new Int32Value(blob.length));
            r.parameters().add(new DataValue(blob));
            target.invokeAsync(r, Duration.ofSeconds(100), waiter);
        }
        try {
            waiter.waitForReplies();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

    }
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