void time(final int numMessages) throws Exception {
        reset();
        recording.set(true);

        while (bytesCounter.get() < numMessages) {
            Thread.sleep(50);
        }

        recording.set(false);
    }
Simple benchmark for the amount of time to send a given number of messages (used by
Caliper).
benchmark-base/src/main/java/org/conscrypt/ClientSocketBenchmark.java