@SuppressWarnings("SameParameterValue")
    private static void callWithFuture(final RpcClient rpcClient, final String address, int threads) {
        // warmup
        for (int i = 0; i < 10000; i++) {
            try {
                RpcResponseFuture f = rpcClient.invokeWithFuture(address,
                    new Request<byte[]>(BYTES), 5000);
                f.get();
            } catch (Throwable e) {
                e.printStackTrace();
            }
        }

        final int t = 80000;
        long start = System.currentTimeMillis();
        final CountDownLatch latch = new CountDownLatch(threads);
        final AtomicLong count = new AtomicLong();
        final int futureSize = 80;
        for (int i = 0; i < threads; i++) {
            new Thread(new Runnable() {

                List<RpcResponseFuture> futures = new ArrayList<RpcResponseFuture>(futureSize);

                @Override
                public void run() {
                    for (int i = 0; i < t; i++) {
                        try {
                            RpcResponseFuture f = rpcClient.invokeWithFuture(address,
                                new Request<byte[]>(BYTES), 5000);
                            futures.add(f);
                            if (futures.size() == futureSize) {
                                int fSize = futures.size();
                                for (int j = 0; j < fSize; j++) {
                                    try {
                                        futures.get(j).get();
                                    } catch (Throwable t) {
                                        t.printStackTrace();
                                    }
                                }
                                futures.clear();
                            }
                            if (count.getAndIncrement() % 10000 == 0) {
                                System.out.println("count=" + count.get());
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                    if (!futures.isEmpty()) {
                        int fSize = futures.size();
                        for (int j = 0; j < fSize; j++) {
                            try {
                                futures.get(j).get();
                            } catch (Throwable t) {
                                t.printStackTrace();
                            }
                        }
                        futures.clear();
                    }
                    latch.countDown();
                }
            }, "benchmark_" + i).start();
        }

        try {
            latch.await();
            System.out.println("count=" + count.get());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        long second = (System.currentTimeMillis() - start) / 1000;
        System.out.println("Request count: " + count.get() + ", time: " + second + " second, qps: "
                           + count.get() / second);
    }
body=4096, CODEC_FLUSH_CONSOLIDATION=turnOff
Request count: 10240000, time: 347 second, qps: 29510

body=4096, CODEC_FLUSH_CONSOLIDATION=turnOn
Request count: 10240000, time: 311 second, qps: 32926

-------------------------------------------------------

body=1024, CODEC_FLUSH_CONSOLIDATION=turnOff
Request count: 10240000, time: 206 second, qps: 49708

body=1024, CODEC_FLUSH_CONSOLIDATION=turnOn
Request count: 10240000, time: 148 second, qps: 69189

-------------------------------------------------------

body=128, CODEC_FLUSH_CONSOLIDATION=turnOff
Request count: 10240000, time: 148 second, qps: 69189

body=128, CODEC_FLUSH_CONSOLIDATION=turnOn
Request count: 10240000, time: 69 second, qps: 148405
src/test/java/com/alipay/remoting/benchmark/BenchmarkClient.java