TextFormatter { public static StringBuilder elapsedAndSize(long startTimeNanos, long endTimeNanos, long size) { final StringBuilder buf = new StringBuilder(16); appendElapsedAndSize(buf, startTimeNanos, endTimeNanos, size); return buf; } private  TextFormatter(); static StringBuilder elapsed(long elapsedNanos); static StringBuilder elapsed(long startTimeNanos, long endTimeNanos); static void appendElapsed(StringBuilder buf, long elapsedNanos); static void appendElapsed(StringBuilder buf, long startTimeNanos, long endTimeNanos); static StringBuilder size(long size); static void appendSize(StringBuilder buf, long size); static StringBuilder elapsedAndSize(long startTimeNanos, long endTimeNanos, long size); static void appendElapsedAndSize(
            StringBuilder buf, long startTimeNanos, long endTimeNanos, long size); static StringBuilder epochMillis(long timeMillis); static void appendEpochMillis(StringBuilder buf, long timeMillis); static StringBuilder epochMicros(long timeMicros); static void appendEpochMicros(StringBuilder buf, long timeMicros); static StringBuilder socketAddress(@Nullable SocketAddress addr); static void appendSocketAddress(StringBuilder buf, @Nullable SocketAddress addr); static StringBuilder inetAddress(@Nullable InetAddress addr); static void appendInetAddress(StringBuilder buf, @Nullable InetAddress addr);  }
@Test void elapsedAndSize() throws Exception { assertThat(TextFormatter.elapsedAndSize(1, 100, 1024 * 100).toString()) .isEqualTo("99ns, 100KiB(102400B)"); }