@SuppressWarnings("java:S2629")
  public void printStats(String debugUrlPattern) {
    LOGGER.debug("Tile stats:");
    Summary result = summary();
    var overallStats = result.get();
    var formatter = Format.defaultInstance();
    LOGGER.debug("Biggest tiles (gzipped)\n{}", overallStats.formatBiggestTiles(debugUrlPattern));
    var alreadyListed = overallStats.biggestTiles().stream()
      .map(TileSummary::coord)
      .collect(Collectors.toSet());
    var otherTiles = result.layers().stream()
      .flatMap(layer -> result.get(layer).biggestTiles().stream().limit(1))
      .filter(tile -> !alreadyListed.contains(tile.coord) && tile.archivedSize > WARN_BYTES)
      .toList();
    if (!otherTiles.isEmpty()) {
      LOGGER.info("Other tiles with large layers\n{}",
        otherTiles.stream()
          .map(tile -> "%d/%d/%d (%s) %s (%s)".formatted(
            tile.coord.z(),
            tile.coord.x(),
            tile.coord.y(),
            formatter.storage(tile.archivedSize),
            tile.coord.getDebugUrl(debugUrlPattern),
            tileBiggestLayers(formatter, tile)
          )).collect(Collectors.joining("\n")));
    }

    LOGGER.debug("Max tile sizes\n{}\n{}\n{}",
      result.formatTable(n -> {
        String string = " " + formatter.storage(n, true);
        return n.intValue() > ERROR_BYTES ? AnsiColors.red(string) :
          n.intValue() > WARN_BYTES ? AnsiColors.yellow(string) :
          string;
      }, Cell::maxSize),
      result.formatRow("full tile",
        formatter::storage,
        z -> result.get(z).maxSize(),
        result.get().maxSize()
      ),
      result.formatRow("gzipped",
        formatter::storage,
        z -> result.get(z).maxArchivedSize(),
        result.get().maxArchivedSize()
      )
    );
    LOGGER.debug("   Max tile: {} (gzipped: {})",
      formatter.storage(overallStats.maxSize()),
      formatter.storage(overallStats.maxArchivedSize()));
    LOGGER.debug("   Avg tile: {} (gzipped: {}) {}",
      formatter.storage(overallStats.weightedAverageSize()),
      formatter.storage(overallStats.weightedAverageArchivedSize()),
      tileWeights.isEmpty() ?
        "no tile weights, use --download-osm-tile-weights for weighted average" :
        "using weighted average based on OSM traffic");
    LOGGER.debug("    # tiles: {}", formatter.integer(overallStats.numTiles()));
  }
Logs biggest tiles, max layer size by zoom, and weighted average tile sizes.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/TilesetSummaryStatistics.java