Skip to content

Commit a5a6894

Browse files
authored
don't count health check conferences in current count or all-time count (#403)
1 parent ab225c0 commit a5a6894

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/main/java/org/jitsi/jicofo/FocusManager.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ private JitsiMeetConferenceImpl createConference(
469469
conferences.put(room, conference);
470470
conferenceIds.add(id);
471471

472-
statistics.totalConferencesCreated.incrementAndGet();
472+
if (includeInStatistics)
473+
{
474+
statistics.totalConferencesCreated.incrementAndGet();
475+
}
473476

474477
if (conference.getLogger().isInfoEnabled())
475478
{
@@ -665,6 +668,13 @@ public int getConferenceCount()
665668
return conferences.size();
666669
}
667670

671+
public int getNonHealthCheckConferenceCount()
672+
{
673+
return (int)conferences.values().stream()
674+
.filter(JitsiMeetConferenceImpl::includeInStatistics)
675+
.count();
676+
}
677+
668678
/**
669679
* Returns <tt>true</tt> if graceful shutdown mode has been enabled and
670680
* the process is going to be finished once conference count drops to zero.

src/main/java/org/jitsi/jicofo/stats/JicofoStatisticsSnapshot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static JicofoStatisticsSnapshot generate(
4848
focusManager.getStatistics().totalParticipants.get();
4949
snapshot.totalConferencesCreated =
5050
focusManager.getStatistics().totalConferencesCreated.get();
51-
snapshot.numConferences = focusManager.getConferenceCount();
51+
snapshot.numConferences = focusManager.getNonHealthCheckConferenceCount();
5252
for (JitsiMeetConference conference : focusManager.getConferences())
5353
{
5454
if (!conference.includeInStatistics())

0 commit comments

Comments
 (0)