public String toString() {
        StringBuilder b=new StringBuilder();

        if (notes.size()>0) {
            b.append("Optimization notes:\n");
            List<String> displayedNotes=notes.subList(0,Math.min(5,notes.size()));
            for (String note : displayedNotes)
                b.append("   ").append(note).append("\n");
            if (notes.size()>displayedNotes.size())
                b.append("   ...\n");
        }

        b.append("Optimization metrics:\n");
        for (Map.Entry<String,Integer> metric : metrics.entrySet())
            b.append("   " + metric.getKey() + ": " + metric.getValue() + "\n");
        return b.toString();
    }
Returns all the content of this report as a multiline string
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/OptimizationReport.java