diff --git a/src/main/java/org/cbioportal/web/GeneralControllerAdvice.java b/src/main/java/org/cbioportal/web/GeneralControllerAdvice.java index e0477e995dd..dbf2fc9d867 100644 --- a/src/main/java/org/cbioportal/web/GeneralControllerAdvice.java +++ b/src/main/java/org/cbioportal/web/GeneralControllerAdvice.java @@ -20,6 +20,9 @@ public boolean supports(MethodParameter returnType, Class> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { ServletServerHttpRequest servletServerRequest = (ServletServerHttpRequest) request; + + // report the procesing time of all api endpoints to aid in benchmarking as we transition + // to clickhouse long startTime = (long) servletServerRequest.getServletRequest().getAttribute("startTime"); long timeElapsed = System.currentTimeMillis() - startTime; response.getHeaders().add("Elapsed-Time", String.valueOf(timeElapsed));