public String formatResults(TimeUnit tUnit) {
        double avg = getAverage(tUnit);
        double fast = getFastest(tUnit);
        double slow = getSlowest(tUnit);
        double t95p = get95thPercentile(tUnit);
        double t99p = get99thPercentile(tUnit);
        int width = Math.max(8, DoubleStream.of(avg, fast, slow, t95p, t99p).mapToObj(d -> String.format("%.4f", d))
                .mapToInt(String::length).max().getAsInt());
        
        return String.format("Task %s -> %s: (Unit: %s)\n" 
                + "  Count    : %" + width + "d      Average  : %" + width + ".4f\n" 
                + "  Fastest  : %" + width + ".4f      Slowest  : %" + width + ".4f\n"
                + "  95Pctile : %" + width + ".4f      99Pctile : %" + width + ".4f\n" 
                + "  TimeBlock : %s\n" 
                + "  Histogram : %s\n",
                suite, name, unitName[tUnit.ordinal()],
                results.length, avg,
                fast, slow,
                t95p, t99p, 
                formatZoneTime(getZoneTimes(10, tUnit)),
                formatHisto(getDoublingHistogram()));
    }
public String formatResults ( TimeUnit tUnit ) { double avg = getAverage ( tUnit ) ; double fast = getFastest ( tUnit ) ; double slow = getSlowest ( tUnit ) ; double t95p = get95thPercentile ( tUnit ) ; double t99p = get99thPercentile ( tUnit ) ; int width = Math . max ( 8 , DoubleStream . of ( avg , fast , slow , t95p , t99p ) . mapToObj ( d -> String . format ( "%.4f" , d ) ) . mapToInt ( String :: length ) . max ( ) . getAsInt ( ) ) ; return String . format ( "Task %s -> %s: (Unit: %s)\n" + "  Count    : %" + width + "d      Average  : %" + width + ".4f\n" + "  Fastest  : %" + width + ".4f      Slowest  : %" + width + ".4f\n" + "  95Pctile : %" + width + ".4f      99Pctile : %" + width + ".4f\n" + "  TimeBlock : %s\n" + "  Histogram : %s\n" , suite , name , unitName [ tUnit . ordinal ( ) ] , results . length , avg , fast , slow , t95p , t99p , formatZoneTime ( getZoneTimes ( 10 , tUnit ) ) , formatHisto ( getDoublingHistogram ( ) ) ) ; }
Present the results from this task in a formatted string output.
@param tUnit the units in which to display the times (see {@link UStats#getGoodUnit() } for a suggestion).
@return A string representing the statistics.
@see UStats#getGoodUnit()