aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/util/TestUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/util/TestUtils.java')
-rw-r--r--uitest/src/com/vaadin/tests/util/TestUtils.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/util/TestUtils.java b/uitest/src/com/vaadin/tests/util/TestUtils.java
index 6cb6e79c1c..5c6315a23a 100644
--- a/uitest/src/com/vaadin/tests/util/TestUtils.java
+++ b/uitest/src/com/vaadin/tests/util/TestUtils.java
@@ -120,20 +120,23 @@ public class TestUtils {
public static void installPerformanceReporting(TextArea targetTextArea) {
targetTextArea.setId("performanceTestTarget");
JavaScript
- .eval("window.reportVaadinPerformance = function(topic, serverLimit, clientLimit) {"
+ .eval("window.reportVaadinPerformance = function(topic, serverLimit, clientLimit, bootstrapTime) {"
+ "var element = document.getElementById('performanceTestTarget');"
+ "var text = topic + ': \\n';"
+ "for(var k in window.vaadin.clients) {"
+ "var p = window.vaadin.clients[k].getProfilingData();"
+ "text += ' Server time: ' + (p[3] > serverLimit?'FAIL':'OK') + ' (' + p[3] +')\\n';"
+ "text += ' Client time: ' + (p[0] > clientLimit?'FAIL':'OK') + ' (' + p[0] +')\\n';"
+ + "if (bootstrapTime) text += ' Bootstrap time: ' + (p[4] > clientLimit?'FAIL':'OK') + ' (' + p[4] +')\\n';"
+ "}" + "element.value = text;" + "}");
}
public static void reportPerformance(String topic, int serverLimit,
- int totalLimit) {
- JavaScript.eval("window.reportVaadinPerformance(\"" + topic + "\", "
- + serverLimit + ", " + totalLimit + ");");
+ int clientLimit, boolean bootstrapTime) {
+ JavaScript
+ .eval("window.reportVaadinPerformance(\"" + topic + "\", "
+ + serverLimit + ", " + clientLimit + ","
+ + bootstrapTime + ");");
}
public static IndexedContainer getISO3166Container() {