Skip to content

Commit

Permalink
ref: Port both failed conferences stats to Metrics. (#1930)
Browse files Browse the repository at this point in the history
* ref: Port both failed conferences stats to Metrics.

Signed-off-by: Alexandre Fonseca <[email protected]>

* Rename metric variables and update descriptions.

* ref: Rename "failed conferences" metric variables.

* doc: Update comments and metric descriptions.

Signed-off-by: Alexandre Fonseca <[email protected]>
  • Loading branch information
alexcsf authored Aug 5, 2022
1 parent 0a2decd commit 915593c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions jvb/src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,12 @@ private void updateStatisticsOnExpire()

if (hasPartiallyFailed)
{
videobridgeStatistics.totalPartiallyFailedConferences.incrementAndGet();
videobridgeStatistics.partiallyFailedConferences.incAndGet();
}

if (hasFailed)
{
videobridgeStatistics.totalFailedConferences.incrementAndGet();
videobridgeStatistics.failedConferences.incAndGet();
}

if (logger.isInfoEnabled())
Expand Down
16 changes: 8 additions & 8 deletions jvb/src/main/java/org/jitsi/videobridge/Videobridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -945,18 +945,18 @@ public static class Statistics
public AtomicInteger incomingBitrateExpirations = new AtomicInteger(0);

/**
* The cumulative/total number of conferences that had all of their
* channels failed because there was no transport activity (which
* includes those that failed because there was no payload activity).
* The cumulative/total number of conferences in which ALL of the endpoints failed ICE.
*/
public AtomicInteger totalFailedConferences = new AtomicInteger(0);
public CounterMetric failedConferences = VideobridgeMetricsContainer.getInstance().registerCounter(
"failed_conferences",
"Number of conferences in which ALL of the endpoints failed ICE.");

/**
* The cumulative/total number of conferences that had some of their
* channels failed because there was no transport activity (which
* includes those that failed because there was no payload activity).
* The cumulative/total number of conferences in which SOME of the endpoints failed ICE.
*/
public AtomicInteger totalPartiallyFailedConferences = new AtomicInteger(0);
public CounterMetric partiallyFailedConferences = VideobridgeMetricsContainer.getInstance().registerCounter(
"partially_failed_conferences",
"Number of conferences in which SOME of the endpoints failed ICE.");

/**
* The cumulative/total number of conferences completed/expired on this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@ private void generate0()
unlockedSetStat(RTT_AGGREGATE, rttAggregate);
unlockedSetStat(
TOTAL_FAILED_CONFERENCES,
jvbStats.totalFailedConferences.get());
jvbStats.failedConferences.get());
unlockedSetStat(
TOTAL_PARTIALLY_FAILED_CONFERENCES,
jvbStats.totalPartiallyFailedConferences.get());
jvbStats.partiallyFailedConferences.get());
unlockedSetStat(
TOTAL_CONFERENCES_CREATED,
jvbStats.totalConferencesCreated.get());
Expand Down

0 comments on commit 915593c

Please sign in to comment.