presto-main/src/main/java/io/prestosql/execution/QueryManagerStats.java/QueryManagerStats/trackQueryStats
class QueryManagerStats:    public void trackQueryStats(QueryExecution managedQueryExecution)
    {
        submittedQueries.update(1);
        queuedQueries.incrementAndGet();
        managedQueryExecution.addStateChangeListener(new StatisticsListener());
        managedQueryExecution.addFinalQueryInfoListener(finalQueryInfo -> queryFinished(new BasicQueryInfo(finalQueryInfo)));
    }