@Override
  public Long incrementCounter(String name, long increment) {
    String key = name;
    try {
      countersLock.lock();
      counters.get(key).inc(increment);
      return counters.get(key).getCount();
    } catch(ExecutionException ee) {
      throw new IllegalStateException("Error retrieving counter from the metric registry ", ee);
    } finally {
      countersLock.unlock();
    }
  }
Closes scope, and records the time taken
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java