|
@@ -38,6 +38,7 @@ import SpeakerStatsCollector from './modules/statistics/SpeakerStatsCollector';
|
38
|
38
|
import Statistics from './modules/statistics/statistics';
|
39
|
39
|
import Transcriber from './modules/transcription/transcriber';
|
40
|
40
|
import GlobalOnErrorHandler from './modules/util/GlobalOnErrorHandler';
|
|
41
|
+import { hashString } from './modules/util/MathUtil';
|
41
|
42
|
import RandomUtil from './modules/util/RandomUtil';
|
42
|
43
|
import ComponentsVersions from './modules/version/ComponentsVersions';
|
43
|
44
|
import VideoSIPGW from './modules/videosipgw/VideoSIPGW';
|
|
@@ -374,6 +375,13 @@ JitsiConference.prototype._init = function(options = {}) {
|
374
|
375
|
});
|
375
|
376
|
this.participantConnectionStatus.init();
|
376
|
377
|
|
|
378
|
+ // Add the ability to enable callStats only on a percentage of conferences based on config.js settings.
|
|
379
|
+ let enableCallStats = true;
|
|
380
|
+
|
|
381
|
+ if (config.testing && config.testing.callStatsThreshold) {
|
|
382
|
+ enableCallStats = (hashString(this.options.name) % 100) < config.testing.callStatsThreshold;
|
|
383
|
+ }
|
|
384
|
+
|
377
|
385
|
if (!this.statistics) {
|
378
|
386
|
this.statistics = new Statistics(this.xmpp, {
|
379
|
387
|
aliasName: this._statsCurrentId,
|
|
@@ -384,6 +392,7 @@ JitsiConference.prototype._init = function(options = {}) {
|
384
|
392
|
callStatsID: config.callStatsID,
|
385
|
393
|
callStatsSecret: config.callStatsSecret,
|
386
|
394
|
callStatsApplicationLogsDisabled: config.callStatsApplicationLogsDisabled,
|
|
395
|
+ enableCallStats,
|
387
|
396
|
roomName: this.options.name,
|
388
|
397
|
applicationName: config.applicationName,
|
389
|
398
|
getWiFiStatsMethod: config.getWiFiStatsMethod
|