public static Duration getTotalQueryTime(Type type) {
        return switch (type) {
            case select -> totalSelectTime;
            case update -> totalUpdateTime;
            case insert -> totalInsertTime;
            case delete -> totalDeleteTime;
        };
    }
Returns the total amount of time in milliseconds spent doing a particular
type of query. Note that this isn't necessarily representative of actual real
time since db queries often occur in parallel.

@param type the type of query to check.
@return the number of milliseconds spent executing the specified type of
        query.
xmppserver/src/main/java/org/jivesoftware/database/ProfiledConnection.java