@Override
    public void visitBenchmark(final BenchmarkResult benchRes) {
        final int numberOfColumns = 9;
        NiceTable table = new NiceTable(numberOfColumns);
        table = generateHeader(table);
        for (final AbstractMeter meter : benchRes.getRegisteredMeters()) {
            table.addHeader(meter.getName(), '=', Alignment.Center);
            for (final ClassResult classRes : benchRes.getIncludedResults()) {
                table.addHeader(classRes.getElementName(), '.', Alignment.Left);
                for (final MethodResult methRes : classRes.getIncludedResults()) {
                    table = generateMeterResult(methRes.getElementName(), meter, methRes, table);
                }

                table.addHeader(new StringBuilder("Summary for ").append(classRes.getElementName()).toString(), '_', Alignment.Left);
                table = generateMeterResult("", meter, classRes, table);
                table.addLine('-');

            }
        }
        table.addHeader("Summary for the whole benchmark", '=', Alignment.Center);

        for (final AbstractMeter meter : benchRes.getRegisteredMeters()) {
            table = generateMeterResult("", meter, benchRes, table);
        }

        table.addHeader("Exceptions", '=', Alignment.Center);
        for (final AbstractPerfidixMethodException exec : benchRes.getExceptions()) {
            final StringBuilder execBuilder0 = new StringBuilder();
            execBuilder0.append("Related exception: ").append(exec.getExec().getClass().getSimpleName());
            table.addHeader(execBuilder0.toString(), ' ', Alignment.Left);

            final StringBuilder execBuilder1 = new StringBuilder();
            if (exec instanceof PerfidixMethodInvocationException) {
                execBuilder1.append("Related place: method invocation");
            } else {
                execBuilder1.append("Related place: method check");
            }
            table.addHeader(execBuilder1.toString(), ' ', Alignment.Left);
            if (exec.getMethod() != null) {
                final StringBuilder execBuilder2 = new StringBuilder();
                execBuilder2.append("Related method: ").append(exec.getMethod().getName());
                table.addHeader(execBuilder2.toString(), ' ', Alignment.Left);
            }
            final StringBuilder execBuilder3 = new StringBuilder();
            execBuilder3.append("Related annotation: ").append(exec.getRelatedAnno().getSimpleName());
            table.addHeader(execBuilder3.toString(), ' ', Alignment.Left);
            table.addLine('-');

        }
        table.addLine('=');
        out.println(table.toString());
    }
@ Override public void visitBenchmark ( final BenchmarkResult benchRes ) { final int numberOfColumns = 9 ; NiceTable table = new NiceTable ( numberOfColumns ) ; table = generateHeader ( table ) ; for ( final AbstractMeter meter : benchRes . getRegisteredMeters ( ) ) { table . addHeader ( meter . getName ( ) , '=' , Alignment . Center ) ; for ( final ClassResult classRes : benchRes . getIncludedResults ( ) ) { table . addHeader ( classRes . getElementName ( ) , '.' , Alignment . Left ) ; for ( final MethodResult methRes : classRes . getIncludedResults ( ) ) { table = generateMeterResult ( methRes . getElementName ( ) , meter , methRes , table ) ; } table . addHeader ( new StringBuilder ( "Summary for " ) . append ( classRes . getElementName ( ) ) . toString ( ) , '_' , Alignment . Left ) ; table = generateMeterResult ( "" , meter , classRes , table ) ; table . addLine ( '-' ) ; } } table . addHeader ( "Summary for the whole benchmark" , '=' , Alignment . Center ) ; for ( final AbstractMeter meter : benchRes . getRegisteredMeters ( ) ) { table = generateMeterResult ( "" , meter , benchRes , table ) ; } table . addHeader ( "Exceptions" , '=' , Alignment . Center ) ; for ( final AbstractPerfidixMethodException exec : benchRes . getExceptions ( ) ) { final StringBuilder execBuilder0 = new StringBuilder ( ) ; execBuilder0 . append ( "Related exception: " ) . append ( exec . getExec ( ) . getClass ( ) . getSimpleName ( ) ) ; table . addHeader ( execBuilder0 . toString ( ) , ' ' , Alignment . Left ) ; final StringBuilder execBuilder1 = new StringBuilder ( ) ; if ( exec instanceof PerfidixMethodInvocationException ) { execBuilder1 . append ( "Related place: method invocation" ) ; } else { execBuilder1 . append ( "Related place: method check" ) ; } table . addHeader ( execBuilder1 . toString ( ) , ' ' , Alignment . Left ) ; if ( exec . getMethod ( ) != null ) { final StringBuilder execBuilder2 = new StringBuilder ( ) ; execBuilder2 . append ( "Related method: " ) . append ( exec . getMethod ( ) . getName ( ) ) ; table . addHeader ( execBuilder2 . toString ( ) , ' ' , Alignment . Left ) ; } final StringBuilder execBuilder3 = new StringBuilder ( ) ; execBuilder3 . append ( "Related annotation: " ) . append ( exec . getRelatedAnno ( ) . getSimpleName ( ) ) ; table . addHeader ( execBuilder3 . toString ( ) , ' ' , Alignment . Left ) ; table . addLine ( '-' ) ; } table . addLine ( '=' ) ; out . println ( table . toString ( ) ) ; }
{@inheritDoc}