瀏覽代碼

Adds time logs for external_connect.js

tags/v0.0.2
hristoterezov 9 年之前
父節點
當前提交
4c4925b4a0
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      connection_optimization/external_connect.js

+ 4
- 0
connection_optimization/external_connect.js 查看文件

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…
取消
儲存