浏览代码

fix(callstats): Go back to enabling callstats on % of users rather than conferences

dev1
Jaya Allamsetty 5 年前
父节点
当前提交
4126064855
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2
    3
      JitsiConference.js

+ 2
- 3
JitsiConference.js 查看文件

@@ -38,7 +38,6 @@ 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';
42 41
 import RandomUtil from './modules/util/RandomUtil';
43 42
 import ComponentsVersions from './modules/version/ComponentsVersions';
44 43
 import VideoSIPGW from './modules/videosipgw/VideoSIPGW';
@@ -375,11 +374,11 @@ JitsiConference.prototype._init = function(options = {}) {
375 374
             });
376 375
     this.participantConnectionStatus.init();
377 376
 
378
-    // Add the ability to enable callStats only on a percentage of conferences based on config.js settings.
377
+    // Add the ability to enable callStats only on a percentage of users based on config.js settings.
379 378
     let enableCallStats = true;
380 379
 
381 380
     if (config.testing && config.testing.callStatsThreshold) {
382
-        enableCallStats = (hashString(this.options.name) % 100) < config.testing.callStatsThreshold;
381
+        enableCallStats = (Math.random() * 100) <= config.testing.callStatsThreshold;
383 382
     }
384 383
 
385 384
     if (!this.statistics) {

正在加载...
取消
保存