public static void prettyPrintTable(
        List<String> headers,
        List<List<String>> rows,
        PrintStream out
    ) {
        List<Integer> columnLengths = headers.stream()
            .map(String::length)
            .collect(Collectors.toList());

        for (List<String> row : rows) {
            for (int i = 0; i < headers.size(); i++) {
                columnLengths.set(i, Math.max(columnLengths.get(i), row.get(i).length()));
            }
        }

        printRow(columnLengths, headers, out);
        rows.forEach(row -> printRow(columnLengths, row, out));
    }
print out the metrics in alphabetical order
@param metrics   the metrics to be printed out
tools/src/main/java/org/apache/kafka/tools/ToolsUtils.java