ap.@com.vaadin.terminal.gwt.client.ApplicationConnection::lastProcessingTime,
ap.@com.vaadin.terminal.gwt.client.ApplicationConnection::totalProcessingTime
];
- pd = pd.concat(ap.@com.vaadin.terminal.gwt.client.ApplicationConnection::testBenchServerStatus);
+ pd = pd.concat(ap.@com.vaadin.terminal.gwt.client.ApplicationConnection::serverTimingInfo);
return pd;
});
* servicing the session so far. These values are always one request behind,
* since they cannot be measured before the request is finished.
*/
- private ValueMap testBenchServerStatus;
+ private ValueMap serverTimingInfo;
static final int MAX_CSS_WAITS = 100;
}
/*
- * Hook for TestBench to get details about server status
+ * Hook for e.g. TestBench to get details about server peformance
*/
- if (json.containsKey("tbss")) {
- testBenchServerStatus = json.getValueMap("tbss");
+ if (json.containsKey("timings")) {
+ serverTimingInfo = json.getValueMap("timings");
}
Command c = new Command() {
.endTransaction(application, request);
}
} finally {
- if (requestStarted) {
- ((PortletRequestListener) application).onRequestEnd(
- request, response);
+ try {
+ if (requestStarted) {
+ ((PortletRequestListener) application)
+ .onRequestEnd(request, response);
+ }
+ } finally {
+ requestTimer
+ .stop((AbstractWebApplicationContext) application
+ .getContext());
}
-
- requestTimer
- .stop((AbstractWebApplicationContext) application
- .getContext());
}
}
}
}
} finally {
- if (requestStarted) {
- ((HttpServletRequestListener) application).onRequestEnd(
- request, response);
+ try {
+ if (requestStarted) {
+ ((HttpServletRequestListener) application)
+ .onRequestEnd(request, response);
+ }
+ } finally {
+ requestTimer
+ .stop((AbstractWebApplicationContext) application
+ .getContext());
}
-
- requestTimer.stop((AbstractWebApplicationContext) application
- .getContext());
}
}
dragAndDropService.printJSONResponse(outWriter);
}
- writePerformanceDataForTestBench(outWriter);
+ writePerformanceData(outWriter);
}
/**
- * Adds the performance timing data used by TestBench 3 to the UIDL
+ * Adds the performance timing data (used by TestBench 3) to the UIDL
* response.
*/
- private void writePerformanceDataForTestBench(final PrintWriter outWriter) {
+ private void writePerformanceData(final PrintWriter outWriter) {
AbstractWebApplicationContext ctx = (AbstractWebApplicationContext) application
.getContext();
- outWriter.write(String.format(", \"tbss\":[%d, %d]",
+ outWriter.write(String.format(", \"timings\":[%d, %d]",
ctx.getTotalSessionTime(), ctx.getLastRequestTime()));
}