This default can be changed in deployment configuration.</li>
<li>The annotations @PreserveOnRefresh, @Push, @Theme, @Title, @VaadinServletConfiguration and @Widgetset now use
@Inherited. The annotation is also looked up in extended interfaces for backwards compatibility.</li>
+ <li>Server-side timings of request processing are only sent to the client when not in production mode. Using the
+ timings in TestBench tests requires the server not to be in production mode.</li>
</ul>
<h3 id="knownissues">Known Issues and Limitations</h3>
<ul>
smh.@com.vaadin.client.communication.MessageHandler::lastProcessingTime,
smh.@com.vaadin.client.communication.MessageHandler::totalProcessingTime
];
- pd = pd.concat(smh.@com.vaadin.client.communication.MessageHandler::serverTimingInfo);
+ if (null != smh.@com.vaadin.client.communication.MessageHandler::serverTimingInfo) {
+ pd = pd.concat(smh.@com.vaadin.client.communication.MessageHandler::serverTimingInfo);
+ } else {
+ pd = pd.concat(-1, -1);
+ }
pd[pd.length] = smh.@com.vaadin.client.communication.MessageHandler::bootstrapTime;
return pd;
});
* Debug Window
* Display debug information in the Debug Window and server console
* On-the-fly compilation of Sass themes
+* Timings of server calls for Vaadin TestBench
+
+It is recommended to always deploy production applications in production mode
+for security reasons.
[[advanced.debug.mode]]
== Enabling the Debug Mode
The debug mode is enabled and production mode disabled by default in the UI
-templates created with the Eclipse plugin or the Maven archetypes. The debug
-mode can be enabled by giving a [parameter]#productionMode=false# parameter to
-the Vaadin servlet configuration:
+templates created with the Eclipse plugin or the Maven archetypes. Some
+archetypes have a separate module and profile for producing a production mode
+application. The debug mode can be enabled by giving a
+[parameter]#productionMode=false# parameter to the Vaadin servlet
+configuration:
[subs="normal"]
----
* @throws IOException
*/
private void writePerformanceData(UI ui, Writer writer) throws IOException {
- writer.write(String.format(", \"timings\":[%d, %d]", ui.getSession()
- .getCumulativeRequestDuration(), ui.getSession()
- .getLastRequestDuration()));
+ if (!ui.getSession().getService().getDeploymentConfiguration()
+ .isProductionMode()) {
+ writer.write(String.format(", \"timings\":[%d, %d]", ui
+ .getSession().getCumulativeRequestDuration(), ui
+ .getSession().getLastRequestDuration()));
+ }
}
private static final Logger getLogger() {