@Override
    public void getMetrics(MetricsCollector collector, boolean all) {
      collector.addRecord(this.lockLabel)
               .setContext("Locking")
               .addCounter(LockMetricInfo.ReadLockWaitTimeTotal,
                           readLockWaitTimeTotal.value())
               .addCounter(LockMetricInfo.ReadLockWaitTimeMax,
                           readLockWaitTimeMax.value())
               .addCounter(LockMetricInfo.ReadLockCount,
                           readLockCounts.value())
               .addCounter(LockMetricInfo.WriteLockWaitTimeTotal,
                           writeLockWaitTimeTotal.value())
               .addCounter(LockMetricInfo.WriteLockWaitTimeMax,
                           writeLockWaitTimeMax.value())
               .addCounter(LockMetricInfo.WriteLockCount,
                           writeLockCounts.value());
    }
Creates a new metrics collection instance.
Several locks can share a single <code>MetricsSource</code> instances
where all of them  increment the metrics counts together. This can be
interesting to have a single instance for a group of related locks. The
group should then be identified by the label.

@param label The identifier of the metrics collection
llap-common/src/java/org/apache/hadoop/hive/llap/metrics/ReadWriteLockMetrics.java