public void benchmark()

in tchannel-benchmark/src/main/java/com/uber/tchannel/benchmarks/PingPongMultiServerBenchmark.java [115:133]


    public void benchmark(final AdditionalCounters counters) throws Exception {
        JsonRequest<Ping> request = new JsonRequest.Builder<Ping>("ping-server", "ping")
            .setBody(new Ping("ping?"))
            .setTimeout(20000)
            .setRetryLimit(0)
            .build();

        TFuture<JsonResponse<Pong>> future = this.subClient.send(request);
        future.addCallback(new TFutureCallback<JsonResponse<Pong>>() {
            @Override
            public void onResponse(JsonResponse<Pong> pongResponse) {
                if (!pongResponse.isError()) {
                    counters.actualQPS.incrementAndGet();
                } else {
                    counters.errorQPS.incrementAndGet();
                }
            }
        });
    }