Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Filters some statistics from the logs. Increases the interval for logged statistics.

Boris Grozev806d4ea44398
diff --git a/libs/app.bundle.js b/libs/app.bundle.js
index c902bfc8b8..59ed788680 100644
--- a/libs/app.bundle.js
+++ b/libs/app.bundle.js
@@ -10910,7 +10910,7 @@ function StatsCollector(peerconnection, audioLevelsInterval, statsInterval, even
/**
* Gather PeerConnection stats once every this many milliseconds.
*/
- this.GATHER_INTERVAL = 10000;
+ this.GATHER_INTERVAL = 15000;
/**
* Log stats via the focus once every this many milliseconds.
@@ -11075,6 +11075,38 @@ StatsCollector.prototype.start = function ()
}
};
+/**
+ * Checks whether a certain record should be included in the logged statistics.
+ */
+function acceptStat(reportId, reportType, statName) {
+ if (reportType == "googCandidatePair" && statName == "googChannelId")
+ return false;
+
+ if (reportType == "ssrc") {
+ if (statName == "googTrackId" ||
+ statName == "transportId" ||
+ statName == "ssrc")
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Checks whether a certain record should be included in the logged statistics.
+ */
+function acceptReport(id, type) {
+ if (id.substring(0, 15) == "googCertificate" ||
+ id.substring(0, 9) == "googTrack" ||
+ id.substring(0, 20) == "googLibjingleSession")
+ return false;
+
+ if (type == "goodComponent")
+ return false;
+
+ return true;
+}
+
/**
* Converts the stats to the format used for logging, and saves the data in
* this.statsToBeLogged.
@@ -11085,12 +11117,16 @@ StatsCollector.prototype.addStatsToBeLogged = function (reports) {
var num_records = this.statsToBeLogged.timestamps.length;
this.statsToBeLogged.timestamps.push(new Date().getTime());
reports.map(function (report) {
+ if (!acceptReport(report.id, report.type))
+ return;
var stat = self.statsToBeLogged.stats[report.id];
if (!stat) {
stat = self.statsToBeLogged.stats[report.id] = {};
}
stat.type = report.type;
report.names().map(function (name) {
+ if (!acceptStat(report.id, report.type, name))
+ return;
var values = stat[name];
if (!values) {
values = stat[name] = [];
@@ -11452,21 +11488,17 @@ StatsCollector.prototype.processAudioLevelReport = function ()
{
// TODO: can't find specs about what this value really is,
// but it seems to vary between 0 and around 32k.
- audioLevel = formatAudioLevel(audioLevel / 32767);
- var oldLevel = jidStats.ssrc2AudioLevel[ssrc];
- if(jid != APP.xmpp.myJid() && (!oldLevel || oldLevel != audioLevel))
- {
-
- jidStats.ssrc2AudioLevel[ssrc] = audioLevel;
-
+ audioLevel = audioLevel / 32767;
+ jidStats.setSsrcAudioLevel(ssrc, audioLevel);
+ if(jid != APP.xmpp.myJid())
this.eventEmitter.emit("statistics.audioLevel", jid, audioLevel);
- }
}
}
};
+
},{"../../service/RTC/RTCBrowserType":79}],45:[function(require,module,exports){
/**
* Created by hristo on 8/4/14.
diff --git a/modules/statistics/RTPStatsCollector.js b/modules/statistics/RTPStatsCollector.js
index 430f178b92..6b2603e6b1 100644
--- a/modules/statistics/RTPStatsCollector.js
+++ b/modules/statistics/RTPStatsCollector.js
@@ -151,7 +151,7 @@ function StatsCollector(peerconnection, audioLevelsInterval, statsInterval, even
/**
* Gather PeerConnection stats once every this many milliseconds.
*/
- this.GATHER_INTERVAL = 10000;
+ this.GATHER_INTERVAL = 15000;
/**
* Log stats via the focus once every this many milliseconds.
@@ -316,6 +316,38 @@ StatsCollector.prototype.start = function ()
}
};
+/**
+ * Checks whether a certain record should be included in the logged statistics.
+ */
+function acceptStat(reportId, reportType, statName) {
+ if (reportType == "googCandidatePair" && statName == "googChannelId")
+ return false;
+
+ if (reportType == "ssrc") {
+ if (statName == "googTrackId" ||
+ statName == "transportId" ||
+ statName == "ssrc")
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Checks whether a certain record should be included in the logged statistics.
+ */
+function acceptReport(id, type) {
+ if (id.substring(0, 15) == "googCertificate" ||
+ id.substring(0, 9) == "googTrack" ||
+ id.substring(0, 20) == "googLibjingleSession")
+ return false;
+
+ if (type == "goodComponent")
+ return false;
+
+ return true;
+}
+
/**
* Converts the stats to the format used for logging, and saves the data in
* this.statsToBeLogged.
@@ -326,12 +358,16 @@ StatsCollector.prototype.addStatsToBeLogged = function (reports) {
var num_records = this.statsToBeLogged.timestamps.length;
this.statsToBeLogged.timestamps.push(new Date().getTime());
reports.map(function (report) {
+ if (!acceptReport(report.id, report.type))
+ return;
var stat = self.statsToBeLogged.stats[report.id];
if (!stat) {
stat = self.statsToBeLogged.stats[report.id] = {};
}
stat.type = report.type;
report.names().map(function (name) {
+ if (!acceptStat(report.id, report.type, name))
+ return;
var values = stat[name];
if (!values) {
values = stat[name] = [];
@@ -693,18 +729,13 @@ StatsCollector.prototype.processAudioLevelReport = function ()
{
// TODO: can't find specs about what this value really is,
// but it seems to vary between 0 and around 32k.
- audioLevel = formatAudioLevel(audioLevel / 32767);
- var oldLevel = jidStats.ssrc2AudioLevel[ssrc];
- if(jid != APP.xmpp.myJid() && (!oldLevel || oldLevel != audioLevel))
- {
-
- jidStats.ssrc2AudioLevel[ssrc] = audioLevel;
-
+ audioLevel = audioLevel / 32767;
+ jidStats.setSsrcAudioLevel(ssrc, audioLevel);
+ if(jid != APP.xmpp.myJid())
this.eventEmitter.emit("statistics.audioLevel", jid, audioLevel);
- }
}
}
-};
\ No newline at end of file
+};