presto-main/src/main/java/io/prestosql/execution/StageStats.java/StageStats/toBasicStageStats
class StageStats:    public BasicStageStats toBasicStageStats(StageState stageState)
    {
        boolean isScheduled = (stageState == RUNNING) || stageState.isDone();

        OptionalDouble progressPercentage = OptionalDouble.empty();
        if (isScheduled && totalDrivers != 0) {
            progressPercentage = OptionalDouble.of(min(100, (completedDrivers * 100.0) / totalDrivers));
        }

        return new BasicStageStats(
                isScheduled,
                totalDrivers,
                queuedDrivers,
                runningDrivers,
                completedDrivers,
                physicalInputDataSize,
                physicalInputPositions,
                internalNetworkInputDataSize,
                internalNetworkInputPositions,
                rawInputDataSize,
                rawInputPositions,
                (long) cumulativeUserMemory,
                userMemoryReservation,
                totalMemoryReservation,
                totalCpuTime,
                totalScheduledTime,
                fullyBlocked,
                blockedReasons,
                progressPercentage);
    }