|
@@ -10910,7 +10910,7 @@ function StatsCollector(peerconnection, audioLevelsInterval, statsInterval, even
|
10910
|
10910
|
/**
|
10911
|
10911
|
* Gather PeerConnection stats once every this many milliseconds.
|
10912
|
10912
|
*/
|
10913
|
|
- this.GATHER_INTERVAL = 10000;
|
|
10913
|
+ this.GATHER_INTERVAL = 15000;
|
10914
|
10914
|
|
10915
|
10915
|
/**
|
10916
|
10916
|
* Log stats via the focus once every this many milliseconds.
|
|
@@ -11075,6 +11075,38 @@ StatsCollector.prototype.start = function ()
|
11075
|
11075
|
}
|
11076
|
11076
|
};
|
11077
|
11077
|
|
|
11078
|
+/**
|
|
11079
|
+ * Checks whether a certain record should be included in the logged statistics.
|
|
11080
|
+ */
|
|
11081
|
+function acceptStat(reportId, reportType, statName) {
|
|
11082
|
+ if (reportType == "googCandidatePair" && statName == "googChannelId")
|
|
11083
|
+ return false;
|
|
11084
|
+
|
|
11085
|
+ if (reportType == "ssrc") {
|
|
11086
|
+ if (statName == "googTrackId" ||
|
|
11087
|
+ statName == "transportId" ||
|
|
11088
|
+ statName == "ssrc")
|
|
11089
|
+ return false;
|
|
11090
|
+ }
|
|
11091
|
+
|
|
11092
|
+ return true;
|
|
11093
|
+}
|
|
11094
|
+
|
|
11095
|
+/**
|
|
11096
|
+ * Checks whether a certain record should be included in the logged statistics.
|
|
11097
|
+ */
|
|
11098
|
+function acceptReport(id, type) {
|
|
11099
|
+ if (id.substring(0, 15) == "googCertificate" ||
|
|
11100
|
+ id.substring(0, 9) == "googTrack" ||
|
|
11101
|
+ id.substring(0, 20) == "googLibjingleSession")
|
|
11102
|
+ return false;
|
|
11103
|
+
|
|
11104
|
+ if (type == "goodComponent")
|
|
11105
|
+ return false;
|
|
11106
|
+
|
|
11107
|
+ return true;
|
|
11108
|
+}
|
|
11109
|
+
|
11078
|
11110
|
/**
|
11079
|
11111
|
* Converts the stats to the format used for logging, and saves the data in
|
11080
|
11112
|
* this.statsToBeLogged.
|
|
@@ -11085,12 +11117,16 @@ StatsCollector.prototype.addStatsToBeLogged = function (reports) {
|
11085
|
11117
|
var num_records = this.statsToBeLogged.timestamps.length;
|
11086
|
11118
|
this.statsToBeLogged.timestamps.push(new Date().getTime());
|
11087
|
11119
|
reports.map(function (report) {
|
|
11120
|
+ if (!acceptReport(report.id, report.type))
|
|
11121
|
+ return;
|
11088
|
11122
|
var stat = self.statsToBeLogged.stats[report.id];
|
11089
|
11123
|
if (!stat) {
|
11090
|
11124
|
stat = self.statsToBeLogged.stats[report.id] = {};
|
11091
|
11125
|
}
|
11092
|
11126
|
stat.type = report.type;
|
11093
|
11127
|
report.names().map(function (name) {
|
|
11128
|
+ if (!acceptStat(report.id, report.type, name))
|
|
11129
|
+ return;
|
11094
|
11130
|
var values = stat[name];
|
11095
|
11131
|
if (!values) {
|
11096
|
11132
|
values = stat[name] = [];
|
|
@@ -11452,21 +11488,17 @@ StatsCollector.prototype.processAudioLevelReport = function ()
|
11452
|
11488
|
{
|
11453
|
11489
|
// TODO: can't find specs about what this value really is,
|
11454
|
11490
|
// but it seems to vary between 0 and around 32k.
|
11455
|
|
- audioLevel = formatAudioLevel(audioLevel / 32767);
|
11456
|
|
- var oldLevel = jidStats.ssrc2AudioLevel[ssrc];
|
11457
|
|
- if(jid != APP.xmpp.myJid() && (!oldLevel || oldLevel != audioLevel))
|
11458
|
|
- {
|
11459
|
|
-
|
11460
|
|
- jidStats.ssrc2AudioLevel[ssrc] = audioLevel;
|
11461
|
|
-
|
|
11491
|
+ audioLevel = audioLevel / 32767;
|
|
11492
|
+ jidStats.setSsrcAudioLevel(ssrc, audioLevel);
|
|
11493
|
+ if(jid != APP.xmpp.myJid())
|
11462
|
11494
|
this.eventEmitter.emit("statistics.audioLevel", jid, audioLevel);
|
11463
|
|
- }
|
11464
|
11495
|
}
|
11465
|
11496
|
|
11466
|
11497
|
}
|
11467
|
11498
|
|
11468
|
11499
|
|
11469
|
11500
|
};
|
|
11501
|
+
|
11470
|
11502
|
},{"../../service/RTC/RTCBrowserType":79}],45:[function(require,module,exports){
|
11471
|
11503
|
/**
|
11472
|
11504
|
* Created by hristo on 8/4/14.
|