@@ -401,9 +401,11 @@ public PrintlnStats(String testID, long interval,
401401 this .useMillis = useMillis ;
402402 this .out = out ;
403403 if (out != null ) {
404- out .println ("id,time (s),sent (msg/s),returned (msg/s),confirmed (msg/s), nacked (msg/s), received (msg/s),"
405- + "min latency (microseconds),median latency (microseconds),75th p. latency (microseconds),95th p. latency (microseconds),"
406- + "99th p. latency (microseconds)" );
404+ out .printf ("id,time (s),sent (msg/s),returned (msg/s)," +
405+ "confirmed (msg/s),nacked (msg/s)," +
406+ "received (msg/s),min latency (%s),median latency (%s)," +
407+ "75th p. latency (%s),95th p. latency (%s),99th p. latency (%s)%n" ,
408+ units (), units (), units (), units (), units ());
407409 }
408410 }
409411
@@ -424,15 +426,15 @@ protected void report(long now) {
424426 ", min/avg/max latency: " +
425427 minLatency /1000L + "/" +
426428 cumulativeLatencyInterval / (1000L * latencyCountInterval ) + "/" +
427- maxLatency /1000L + " microseconds " :
429+ maxLatency /1000L + " µs " :
428430 "" );
429431 } else {
430432 output += (latencyCountInterval > 0 ?
431433 ", min/median/75th/95th/99th latency: "
432434 + div (latency .getSnapshot ().getMin ()) + "/"
433435 + div (latency .getSnapshot ().getMedian ()) + "/"
434436 + div (latency .getSnapshot ().get75thPercentile ()) + "/"
435- + div (latency .getSnapshot ().get95thPercentile ()) + units () :
437+ + div (latency .getSnapshot ().get95thPercentile ()) + " " + units () :
436438 "" );
437439 }
438440
@@ -458,9 +460,9 @@ protected void report(long now) {
458460
459461 private String units () {
460462 if (useMillis ) {
461- return " milliseconds " ;
463+ return "ms " ;
462464 } else {
463- return " microseconds " ;
465+ return "µs " ;
464466 }
465467 }
466468
0 commit comments