* UIDL responses only include server side timing information when not in production mode. * Update documentation accordingly. Change-Id: I961d1fdc96b3d04f22254fcd13a5412f17118b42tags/7.7.0.alpha1
@@ -142,6 +142,8 @@ | |||
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> |
@@ -491,7 +491,11 @@ public class ApplicationConnection implements HasHandlers { | |||
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; | |||
}); |
@@ -14,14 +14,20 @@ debug features for Vaadin developers: | |||
* 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"] | |||
---- |
@@ -352,9 +352,12 @@ public class UidlWriter implements Serializable { | |||
* @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() { |