Quellcode durchsuchen

Adds time logs for external_connect.js

tags/v0.0.2
hristoterezov vor 9 Jahren
Ursprung
Commit
4c4925b4a0
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4
    0
      connection_optimization/external_connect.js

+ 4
- 0
connection_optimization/external_connect.js Datei anzeigen

@@ -33,6 +33,8 @@ function createConnectionExternally(webserviceUrl, success_callback,
33 33
 
34 34
     xhttp.onreadystatechange = function() {
35 35
         if (xhttp.readyState == xhttp.DONE) {
36
+            console.log("(TIME) external connect XHR done:\t",
37
+                window.performance.now());
36 38
             if (xhttp.status == HTTP_STATUS_OK) {
37 39
                 try {
38 40
                     var data = JSON.parse(xhttp.responseText);
@@ -50,5 +52,7 @@ function createConnectionExternally(webserviceUrl, success_callback,
50 52
     xhttp.timeout = 3000;
51 53
 
52 54
     xhttp.open("GET", webserviceUrl, true);
55
+    console.log("(TIME) Sending external connect XHR:\t",
56
+        window.performance.now());
53 57
     xhttp.send();
54 58
 }

Laden…
Abbrechen
Speichern