Просмотр исходного кода

Renames performanceTimes to ConnectionTimes

dev1
hristoterezov 9 лет назад
Родитель
Сommit
3c94755413

+ 4
- 4
JitsiConference.js Просмотреть файл

@@ -826,10 +826,10 @@ JitsiConference.prototype.getLogs = function () {
826 826
 };
827 827
 
828 828
 /**
829
- * Returns measured performanceTimes.
829
+ * Returns measured connectionTimes.
830 830
  */
831
-JitsiConference.prototype.getPerformanceTimes = function () {
832
-    return this.room.performanceTimes;
831
+JitsiConference.prototype.getConnectionTimes = function () {
832
+    return this.room.connectionTimes;
833 833
 };
834 834
 
835 835
 /**
@@ -866,7 +866,7 @@ function setupListeners(conference) {
866 866
         if (conference.room.isFocus(jingleSession.peerjid)) {
867 867
             // Accept incoming call
868 868
             conference.room.setJingleSession(jingleSession);
869
-            conference.room.performanceTimes["session.initiate"] = now;
869
+            conference.room.connectionTimes["session.initiate"] = now;
870 870
             jingleSession.initialize(false /* initiator */, conference.room);
871 871
             conference.rtc.onIncommingCall(jingleSession);
872 872
             jingleSession.acceptOffer(jingleOffer, null,

+ 3
- 3
JitsiConnection.js Просмотреть файл

@@ -94,10 +94,10 @@ JitsiConnection.prototype.removeEventListener = function (event, listener) {
94 94
 }
95 95
 
96 96
 /**
97
- * Returns measured performanceTimes.
97
+ * Returns measured connectionTimes.
98 98
  */
99
-JitsiConnection.prototype.getPerformanceTimes = function () {
100
-    return this.xmpp.performanceTimes;
99
+JitsiConnection.prototype.getConnectionTimes = function () {
100
+    return this.xmpp.connectionTimes;
101 101
 };
102 102
 
103 103
 module.exports = JitsiConnection;

+ 3
- 3
connection_optimization/external_connect.js Просмотреть файл

@@ -33,7 +33,7 @@ function createConnectionExternally(webserviceUrl, success_callback,
33 33
 
34 34
     xhttp.onreadystatechange = function() {
35 35
         if (xhttp.readyState == xhttp.DONE) {
36
-            var now = window.performanceTimes["external_connect.done"] =
36
+            var now = window.connectionTimes["external_connect.done"] =
37 37
                 window.performance.now();
38 38
             console.log("(TIME) external connect XHR done:\t", now);
39 39
             if (xhttp.status == HTTP_STATUS_OK) {
@@ -53,8 +53,8 @@ function createConnectionExternally(webserviceUrl, success_callback,
53 53
     xhttp.timeout = 3000;
54 54
 
55 55
     xhttp.open("GET", webserviceUrl, true);
56
-    window.performanceTimes = {};
57
-    var now = window.performanceTimes["external_connect.sending"] =
56
+    window.connectionTimes = {};
57
+    var now = window.connectionTimes["external_connect.sending"] =
58 58
         window.performance.now();
59 59
     console.log("(TIME) Sending external connect XHR:\t", now);
60 60
     xhttp.send();

+ 2
- 2
modules/xmpp/ChatRoom.js Просмотреть файл

@@ -83,7 +83,7 @@ function ChatRoom(connection, jid, password, XMPP, options, settings) {
83 83
     this.lastPresences = {};
84 84
     this.phoneNumber = null;
85 85
     this.phonePin = null;
86
-    this.performanceTimes = {};
86
+    this.connectionTimes = {};
87 87
 }
88 88
 
89 89
 ChatRoom.prototype.initPresenceMap = function () {
@@ -264,7 +264,7 @@ ChatRoom.prototype.onPresence = function (pres) {
264 264
         }
265 265
         if (!this.joined) {
266 266
             this.joined = true;
267
-            var now = this.performanceTimes["muc.joined"] =
267
+            var now = this.connectionTimes["muc.joined"] =
268 268
                 window.performance.now();
269 269
             logger.log("(TIME) MUC joined:\t", now);
270 270
             this.eventEmitter.emit(XMPPEvents.MUC_JOINED);

+ 1
- 1
modules/xmpp/JingleSessionPC.js Просмотреть файл

@@ -153,7 +153,7 @@ JingleSessionPC.prototype.doInitialize = function () {
153 153
     this.peerconnection.oniceconnectionstatechange = function (event) {
154 154
         if (!(self && self.peerconnection)) return;
155 155
         var now = window.performance.now();
156
-        self.room.performanceTimes["ice.state." +
156
+        self.room.connectionTimes["ice.state." +
157 157
             self.peerconnection.iceConnectionState] = now;
158 158
         logger.log("(TIME) ICE " + self.peerconnection.iceConnectionState +
159 159
                     ":\t", now);

+ 3
- 3
modules/xmpp/xmpp.js Просмотреть файл

@@ -37,7 +37,7 @@ function XMPP(options, token) {
37 37
     this.eventEmitter = new EventEmitter();
38 38
     this.connection = null;
39 39
     this.disconnectInProgress = false;
40
-    this.performanceTimes = {};
40
+    this.connectionTimes = {};
41 41
     this.forceMuted = false;
42 42
     this.options = options;
43 43
     initStrophePlugins(this);
@@ -62,7 +62,7 @@ XMPP.prototype.getConnection = function () { return this.connection; };
62 62
  */
63 63
 XMPP.prototype.connectionHandler = function (password, status, msg) {
64 64
     var now = window.performance.now();
65
-    this.performanceTimes[Strophe.getStatusString(status).toLowerCase()] = now;
65
+    this.connectionTimes[Strophe.getStatusString(status).toLowerCase()] = now;
66 66
     logger.log("(TIME) Strophe " + Strophe.getStatusString(status) +
67 67
         (msg ? "[" + msg + "]" : "") + ":\t", now);
68 68
     if (status === Strophe.Status.CONNECTED ||
@@ -169,7 +169,7 @@ XMPP.prototype._connect = function (jid, password) {
169 169
  * @param options {object} connecting options - rid, sid, jid and password.
170 170
  */
171 171
  XMPP.prototype.attach = function (options) {
172
-    var now = this.performanceTimes["attaching"] = window.performance.now();
172
+    var now = this.connectionTimes["attaching"] = window.performance.now();
173 173
     logger.log("(TIME) Strophe Attaching\t:" + now);
174 174
     this.connection.attach(options.jid, options.sid, parseInt(options.rid,10)+1,
175 175
         this.connectionHandler.bind(this, options.password));

Загрузка…
Отмена
Сохранить