private long storeElapsedTime(ThreadLocal<Long> startHolder, ConcurrentMap<String, Long> map) {
    long end = ticker.read();
    long elapsed = Long.MIN_VALUE;
    Long start = startHolder.get();
    if (start != null && start <= end) {
      elapsed = TimeUnit.NANOSECONDS.toMillis(end - start);
      String name = Thread.currentThread().getName();
      map.putIfAbsent(name, 0L);
      if (elapsed > 0) {
        map.put(name, map.get(name) + elapsed);
      }
    }
    startHolder.remove();
    return elapsed;
  }
Should be called by the lock to indicate that the lock was unlocked.  For reentrant locks this may or may not
mean the lock was actually released.
ambari-server/src/main/java/org/apache/ambari/server/logging/LockProfileDelegate.java