Code example for Stopwatch

0
  { 
    final Timer timer = timer(repository, httpRequest, baseUrl);
    final Timer.Context timerContext = timer.time(); 
    Stopwatch stopwatch = null;
    if (outboundRequestLog.isDebugEnabled()) { 
      stopwatch = new Stopwatch().start();
    } 
    try { 
      return doExecuteRequest(repository, request, httpRequest, contentRequest);
    } 
    finally { 
      timerContext.stop(); 
      if (stopwatch != null) {
        outboundRequestLog 
            .debug("[{}] {} {} - {}", repository.getId(), httpRequest.getMethod(), httpRequest.getURI(), stopwatch);
      } 
    } 
  } 
 
  private Timer timer(final ProxyRepository repository, final HttpUriRequest httpRequest, final String baseUrl) {
Stop searching for code, let great code find you!  Add Codota to your java IDE