Skip to content

Commit

Permalink
don't count health check conferences in current count or all-time cou…
Browse files Browse the repository at this point in the history
…nt (#403)
  • Loading branch information
bbaldino authored Nov 11, 2019
1 parent ab225c0 commit a5a6894
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/main/java/org/jitsi/jicofo/FocusManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,10 @@ private JitsiMeetConferenceImpl createConference(
conferences.put(room, conference);
conferenceIds.add(id);

statistics.totalConferencesCreated.incrementAndGet();
if (includeInStatistics)
{
statistics.totalConferencesCreated.incrementAndGet();
}

if (conference.getLogger().isInfoEnabled())
{
Expand Down Expand Up @@ -665,6 +668,13 @@ public int getConferenceCount()
return conferences.size();
}

public int getNonHealthCheckConferenceCount()
{
return (int)conferences.values().stream()
.filter(JitsiMeetConferenceImpl::includeInStatistics)
.count();
}

/**
* Returns <tt>true</tt> if graceful shutdown mode has been enabled and
* the process is going to be finished once conference count drops to zero.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static JicofoStatisticsSnapshot generate(
focusManager.getStatistics().totalParticipants.get();
snapshot.totalConferencesCreated =
focusManager.getStatistics().totalConferencesCreated.get();
snapshot.numConferences = focusManager.getConferenceCount();
snapshot.numConferences = focusManager.getNonHealthCheckConferenceCount();
for (JitsiMeetConference conference : focusManager.getConferences())
{
if (!conference.includeInStatistics())
Expand Down

0 comments on commit a5a6894

Please sign in to comment.