code: public final String report() {
          StringBuilder sb = new StringBuilder();
          
          sb.append(String.format("%s stats: %s\n", name, this));
  
          if (pubs.hasSamples()) {
              String indent = " ";
              if (subs.hasSamples()) {
                  sb.append(String.format("%sPub stats: %s\n", indent, pubs));
                  indent = "  ";
              }
              if (pubs.getSamples().size() > 1) {
                  for (Sample stat : pubs.getSamples()) {
                      sb.append(String.format("%s[%2d] %s (%d msgs)\n", indent,
                              pubs.getSamples().indexOf(stat) + 1, stat, stat.jobMsgCnt));
                  }
                  sb.append(String.format("%s %s\n", indent, pubs.statistics()));
              }
          }
          if (subs.hasSamples()) {
              String indent = " ";
              sb.append(String.format("%sSub stats: %s\n", indent, subs));
              indent = "  ";
              if (subs.getSamples().size() > 1) {
                  for (Sample stat : subs.getSamples()) {
                      sb.append(String.format("%s[%2d] %s (%d msgs)\n", indent,
                              subs.getSamples().indexOf(stat) + 1, stat, stat.jobMsgCnt));
                  }
                  sb.append(String.format("%s %s\n", indent, subs.statistics()));
              }
          }
          return sb.toString();
      }
docs: Creates the output report.
  
  @return the report as a String.