presto-cli/src/main/java/io/prestosql/cli/StatusPrinter.java/StatusPrinter/percentage
class StatusPrinter:    private static double percentage(double count, double total)
    {
        if (total == 0) {
            return 0;
        }
        return min(100, (count * 100.0) / total);
    }