Explorar el Código

Merge pull request #55 from jitsi/add_time_logs

Adds time logs for external_connect.js
dev1
damencho hace 9 años
padre
commit
a5478ac43b
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      connection_optimization/external_connect.js

+ 4
- 0
connection_optimization/external_connect.js Ver fichero

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

Loading…
Cancelar
Guardar