Skip to content

Commit

Permalink
fix(#1714): Remove tossed-packets-energy from jvb statistics. (#1795)
Browse files Browse the repository at this point in the history
Expose it through an HTTP API instead.
Bucket stats were not encoded as intended in presence message.
Also, bucket stats JSON encoding was an issue, see #1714.

Co-authored-by: James A <[email protected]>
  • Loading branch information
jqdrqgnq and jqdrqgnq authored Jan 13, 2022
1 parent ba0ea26 commit 153f7e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 0 additions & 2 deletions doc/statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ milliseconds.
* `stress_level` - current stress level on the bridge, with 0 indicating no load and 1 indicating the load is at full
capacity (though values >1 are permitted).
* `threads` - current number of JVM threads.
* `tossedPacketsEnergy` - statistics about the energy level of packets which were discarded due to not coming from one
of the loudest speakers in a conference.
* `total_bytes_received` - total number of bytes received in RTP.
* `total_bytes_received_octo` - total number of bytes received on the `octo` channel.
* `total_bytes_sent` - total number of bytes sent in RTP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public Boolean getJvbFeatureState(@PathParam("feature") DebugFeatures feature)
// Always enabled (worth modeling as a 'feature' then?)
return true;
}
case TOSSED_PACKET_STATS: {
return true;
}
default: {
throw new NotFoundException();
}
Expand Down Expand Up @@ -313,6 +316,9 @@ public String getJvbFeatureStats(@PathParam("feature") DebugFeatures feature)
case ICE_STATS: {
return IceStatistics.Companion.getStats().toJson().toJSONString();
}
case TOSSED_PACKET_STATS: {
return videobridge.getStatistics().tossedPacketsEnergy.toJson().toJSONString();
}
default: {
throw new NotFoundException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public enum DebugFeatures
TASK_POOL_STATS("task-pool-stats"),
NODE_TRACING("node-tracing"),
ICE_STATS("ice-stats"),
XMPP_DELAY_STATS("xmpp-delay-stats");
XMPP_DELAY_STATS("xmpp-delay-stats"),
TOSSED_PACKET_STATS("tossed-packet-stats");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ private void generate0()
unlockedSetStat(
TOTAL_PACKETS_RECEIVED, jvbStats.totalPacketsReceived.get());
unlockedSetStat(TOTAL_PACKETS_SENT, jvbStats.totalPacketsSent.get());
unlockedSetStat("tossedPacketsEnergy", jvbStats.tossedPacketsEnergy.toJson());

OctoRelayService.Stats octoRelayServiceStats
= octoRelayService == null ? null : octoRelayService.getStats();
Expand Down

0 comments on commit 153f7e4

Please sign in to comment.