private boolean isBenchmarking(Request request) {
        com.yahoo.container.jdisc.HttpRequest httpRequest = (com.yahoo.container.jdisc.HttpRequest)request.properties().get(Request.JDISC_REQUEST);
        if (httpRequest == null) return false;
        return VespaHeaders.benchmarkOutput(httpRequest);
    }
This sets header and status from special Data items used for the purpose.
Do both at once to avoid traversing the data tree twice.
container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java