Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't count health check conferences in current count or all-time count #403

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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