summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2016-03-01 14:00:23 +0200
committerVaadin Code Review <review@vaadin.com>2016-03-01 14:02:57 +0000
commit05003bafeb84f8251db6168746893e27bb3b0138 (patch)
tree91e8f9ce890c05cf4c038381e9312972854e4f3a /server
parent81aadbb9edeb4a57dd02c35937905e5427a674e0 (diff)
downloadvaadin-framework-05003bafeb84f8251db6168746893e27bb3b0138.tar.gz
vaadin-framework-05003bafeb84f8251db6168746893e27bb3b0138.zip
Omit timings in production mode (#19644)
* UIDL responses only include server side timing information when not in production mode. * Update documentation accordingly. Change-Id: I961d1fdc96b3d04f22254fcd13a5412f17118b42
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/UidlWriter.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/com/vaadin/server/communication/UidlWriter.java b/server/src/com/vaadin/server/communication/UidlWriter.java
index b117cb4b4d..8a4e62fb24 100644
--- a/server/src/com/vaadin/server/communication/UidlWriter.java
+++ b/server/src/com/vaadin/server/communication/UidlWriter.java
@@ -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() {