From 915593c56ff79347b60dc82647218ae98c7d1775 Mon Sep 17 00:00:00 2001 From: Alexandre <4717855+alexcsf@users.noreply.github.com> Date: Fri, 5 Aug 2022 14:05:23 +0100 Subject: [PATCH] ref: Port both failed conferences stats to Metrics. (#1930) * ref: Port both failed conferences stats to Metrics. Signed-off-by: Alexandre Fonseca <4717855+alexcsf@users.noreply.github.com> * Rename metric variables and update descriptions. * ref: Rename "failed conferences" metric variables. * doc: Update comments and metric descriptions. Signed-off-by: Alexandre Fonseca <4717855+alexcsf@users.noreply.github.com> --- .../java/org/jitsi/videobridge/Conference.java | 4 ++-- .../java/org/jitsi/videobridge/Videobridge.java | 16 ++++++++-------- .../videobridge/stats/VideobridgeStatistics.java | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/jvb/src/main/java/org/jitsi/videobridge/Conference.java b/jvb/src/main/java/org/jitsi/videobridge/Conference.java index a26165da4a..d2f0b31fea 100644 --- a/jvb/src/main/java/org/jitsi/videobridge/Conference.java +++ b/jvb/src/main/java/org/jitsi/videobridge/Conference.java @@ -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()) diff --git a/jvb/src/main/java/org/jitsi/videobridge/Videobridge.java b/jvb/src/main/java/org/jitsi/videobridge/Videobridge.java index 4140545cb2..eefca1503a 100644 --- a/jvb/src/main/java/org/jitsi/videobridge/Videobridge.java +++ b/jvb/src/main/java/org/jitsi/videobridge/Videobridge.java @@ -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 diff --git a/jvb/src/main/java/org/jitsi/videobridge/stats/VideobridgeStatistics.java b/jvb/src/main/java/org/jitsi/videobridge/stats/VideobridgeStatistics.java index 44b50334e4..84302d33b0 100644 --- a/jvb/src/main/java/org/jitsi/videobridge/stats/VideobridgeStatistics.java +++ b/jvb/src/main/java/org/jitsi/videobridge/stats/VideobridgeStatistics.java @@ -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());