presto-main/src/main/java/io/prestosql/execution/executor/TaskExecutor.java/TaskExecutor/getRunningTasksForLevel
class TaskExecutor:    private synchronized int getRunningTasksForLevel(int level)
    {
        int count = 0;
        for (TaskHandle task : tasks) {
            if (task.getPriority().getLevel() == level) {
                count++;
            }
        }
        return count;
    }