public String getClientLatency() {
    if (!enabled) {
      return null;
    }

    Instant trackerStart = Instant.now();
    String latencyDetails = queue.poll(); // non-blocking pop

    if (LOG.isDebugEnabled()) {
      Instant stop = Instant.now();
      long elapsed = Duration.between(trackerStart, stop).toMillis();
      LOG.debug("Dequeued latency info [{} ms]: {}", elapsed, latencyDetails);
    }

    return latencyDetails;
  }
@Test
  public void verifyDisablingOfTracker() throws Exception {
    // verify that disabling of the tracker works
    AbfsPerfTracker abfsPerfTracker = new AbfsPerfTracker(accountName, filesystemName, false);

    String latencyDetails = abfsPerfTracker.getClientLatency();
    assertThat(latencyDetails).describedAs("AbfsPerfTracker should be empty").isNull();

    try (AbfsPerfInfo tracker = new AbfsPerfInfo(abfsPerfTracker, "disablingCaller",
            "disablingCallee")) {
      AbfsJdkHttpOperation op = new AbfsJdkHttpOperation(url, "GET", new ArrayList<>(),
          Duration.ofMillis(DEFAULT_HTTP_CONNECTION_TIMEOUT), Duration.ofMillis(DEFAULT_HTTP_READ_TIMEOUT));
      tracker.registerResult(op).registerSuccess(true);
    }

    latencyDetails = abfsPerfTracker.getClientLatency();
    assertThat(latencyDetails).describedAs("AbfsPerfTracker should return no record").isNull();
  }