|
|
@@ -121,8 +121,8 @@ Statistics.init = function(options) {
|
|
121
|
121
|
Statistics.audioLevelsInterval = options.audioLevelsInterval;
|
|
122
|
122
|
}
|
|
123
|
123
|
|
|
124
|
|
- if (typeof options.performanceStatsInterval === 'number') {
|
|
125
|
|
- Statistics.performanceStatsInterval = options.performanceStatsInterval;
|
|
|
124
|
+ if (typeof options.longTasksStatsInterval === 'number') {
|
|
|
125
|
+ Statistics.longTasksStatsInterval = options.longTasksStatsInterval;
|
|
126
|
126
|
}
|
|
127
|
127
|
|
|
128
|
128
|
Statistics.disableThirdPartyRequests = options.disableThirdPartyRequests;
|
|
|
@@ -193,7 +193,6 @@ export default function Statistics(xmpp, options) {
|
|
193
|
193
|
Statistics.audioLevelsEnabled = false;
|
|
194
|
194
|
Statistics.audioLevelsInterval = 200;
|
|
195
|
195
|
Statistics.pcStatsInterval = 10000;
|
|
196
|
|
-Statistics.performanceStatsInterval = 10000;
|
|
197
|
196
|
Statistics.disableThirdPartyRequests = false;
|
|
198
|
197
|
Statistics.analytics = analytics;
|
|
199
|
198
|
|
|
|
@@ -295,7 +294,7 @@ Statistics.prototype.removeByteSentStatsListener = function(listener) {
|
|
295
|
294
|
* @param {Function} listener a function that would be called when notified.
|
|
296
|
295
|
* @returns {void}
|
|
297
|
296
|
*/
|
|
298
|
|
-Statistics.prototype.addPerformanceStatsListener = function(listener) {
|
|
|
297
|
+Statistics.prototype.addLongTasksStatsListener = function(listener) {
|
|
299
|
298
|
this.eventEmitter.on(StatisticsEvents.LONG_TASKS_STATS, listener);
|
|
300
|
299
|
};
|
|
301
|
300
|
|
|
|
@@ -305,7 +304,7 @@ Statistics.prototype.addPerformanceStatsListener = function(listener) {
|
|
305
|
304
|
*
|
|
306
|
305
|
* @returns {void}
|
|
307
|
306
|
*/
|
|
308
|
|
-Statistics.prototype.attachPerformanceStats = function(conference) {
|
|
|
307
|
+Statistics.prototype.attachLongTasksStats = function(conference) {
|
|
309
|
308
|
if (!browser.supportsPerformanceObserver()) {
|
|
310
|
309
|
logger.warn('Performance observer for long tasks not supported by browser!');
|
|
311
|
310
|
|
|
|
@@ -314,7 +313,7 @@ Statistics.prototype.attachPerformanceStats = function(conference) {
|
|
314
|
313
|
|
|
315
|
314
|
this.performanceObserverStats = new PerformanceObserverStats(
|
|
316
|
315
|
this.eventEmitter,
|
|
317
|
|
- Statistics.performanceStatsInterval);
|
|
|
316
|
+ Statistics.longTasksStatsInterval);
|
|
318
|
317
|
|
|
319
|
318
|
conference.on(
|
|
320
|
319
|
JitsiConferenceEvents.CONFERENCE_JOINED,
|
|
|
@@ -325,14 +324,14 @@ Statistics.prototype.attachPerformanceStats = function(conference) {
|
|
325
|
324
|
};
|
|
326
|
325
|
|
|
327
|
326
|
/**
|
|
328
|
|
- * Obtains the current value of the performance statistics.
|
|
|
327
|
+ * Obtains the current value of the LongTasks event statistics.
|
|
329
|
328
|
*
|
|
330
|
329
|
* @returns {Object|null} stats object if the observer has been
|
|
331
|
330
|
* created, null otherwise.
|
|
332
|
331
|
*/
|
|
333
|
|
-Statistics.prototype.getPerformanceStats = function() {
|
|
|
332
|
+Statistics.prototype.getLongTasksStats = function() {
|
|
334
|
333
|
return this.performanceObserverStats
|
|
335
|
|
- ? this.performanceObserverStats.getPerformanceStats()
|
|
|
334
|
+ ? this.performanceObserverStats.getLongTasksStats()
|
|
336
|
335
|
: null;
|
|
337
|
336
|
};
|
|
338
|
337
|
|
|
|
@@ -342,7 +341,7 @@ Statistics.prototype.getPerformanceStats = function() {
|
|
342
|
341
|
* @param {Function} listener the listener we want to remove.
|
|
343
|
342
|
* @returns {void}
|
|
344
|
343
|
*/
|
|
345
|
|
-Statistics.prototype.removePerformanceStatsListener = function(listener) {
|
|
|
344
|
+Statistics.prototype.removeLongTasksStatsListener = function(listener) {
|
|
346
|
345
|
this.eventEmitter.removeListener(StatisticsEvents.LONG_TASKS_STATS, listener);
|
|
347
|
346
|
};
|
|
348
|
347
|
|