瀏覽代碼

Adds additional logs, including timestamps relative to the initial

request.
dev1
Boris Grozev 10 年之前
父節點
當前提交
80db340c87
共有 4 個檔案被更改,包括 7 行新增2 行删除
  1. 1
    0
      modules/xmpp/ChatRoom.js
  2. 2
    0
      modules/xmpp/JingleSessionPC.js
  3. 2
    0
      modules/xmpp/strophe.jingle.js
  4. 2
    2
      modules/xmpp/xmpp.js

+ 1
- 0
modules/xmpp/ChatRoom.js 查看文件

260
             }
260
             }
261
         if (!this.joined) {
261
         if (!this.joined) {
262
             this.joined = true;
262
             this.joined = true;
263
+            console.log("(TIME) MUC joined:\t", window.performance.now());
263
             this.eventEmitter.emit(XMPPEvents.MUC_JOINED, from, member);
264
             this.eventEmitter.emit(XMPPEvents.MUC_JOINED, from, member);
264
         }
265
         }
265
     } else if (this.members[from] === undefined) {
266
     } else if (this.members[from] === undefined) {

+ 2
- 0
modules/xmpp/JingleSessionPC.js 查看文件

146
      */
146
      */
147
     this.peerconnection.oniceconnectionstatechange = function (event) {
147
     this.peerconnection.oniceconnectionstatechange = function (event) {
148
         if (!(self && self.peerconnection)) return;
148
         if (!(self && self.peerconnection)) return;
149
+        logger.log("(TIME) ICE " + self.peerconnection.iceConnectionState +
150
+                    ":\t", window.performance.now());
149
         self.updateModifySourcesQueue();
151
         self.updateModifySourcesQueue();
150
         switch (self.peerconnection.iceConnectionState) {
152
         switch (self.peerconnection.iceConnectionState) {
151
             case 'connected':
153
             case 'connected':

+ 2
- 0
modules/xmpp/strophe.jingle.js 查看文件

94
             // see http://xmpp.org/extensions/xep-0166.html#concepts-session
94
             // see http://xmpp.org/extensions/xep-0166.html#concepts-session
95
             switch (action) {
95
             switch (action) {
96
                 case 'session-initiate':
96
                 case 'session-initiate':
97
+                    console.log("(TIME) received session-initiate:\t",
98
+                                window.performance.now());
97
                     var startMuted = $(iq).find('jingle>startmuted');
99
                     var startMuted = $(iq).find('jingle>startmuted');
98
                     if (startMuted && startMuted.length > 0) {
100
                     if (startMuted && startMuted.length > 0) {
99
                         var audioMuted = startMuted.attr("audio");
101
                         var audioMuted = startMuted.attr("audio");

+ 2
- 2
modules/xmpp/xmpp.js 查看文件

103
     var connectionFailed = false;
103
     var connectionFailed = false;
104
     var lastErrorMsg;
104
     var lastErrorMsg;
105
     this.connection.connect(jid, password, function (status, msg) {
105
     this.connection.connect(jid, password, function (status, msg) {
106
-        logger.log('Strophe status changed to',
107
-            Strophe.getStatusString(status), msg);
106
+        logger.log("(TIME) Strophe " + Strophe.getStatusString(status) +
107
+            (msg ? "[" + msg + "]" : "") + "\t:" + window.performance.now());
108
         if (status === Strophe.Status.CONNECTED) {
108
         if (status === Strophe.Status.CONNECTED) {
109
             if (self.options.useStunTurn) {
109
             if (self.options.useStunTurn) {
110
                 self.connection.jingle.getStunAndTurnCredentials();
110
                 self.connection.jingle.getStunAndTurnCredentials();

Loading…
取消
儲存