private String toMetricsString() {
    return String.format("[running tasks: %d, pending tasks: %d, task backlog ratio: %.2f, task backlog ratios seen: " +
            "{%s}]", this.runningTasksCount.value, this.pendingTasksCount.value, this.taskBacklogRatio.value,
        getBackLogRatioDurationsString());
  }
TezSessionPoolManagerMetrics collects, aggregates and exposes data from Tez sessions to Hive's own MetricsFactory.
This is independent of the Tez DagClient which is active only while running DAGs.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManagerMetrics.java