Relocate temporary debug message for sending group IMs to online members only so that we can add ms it takes to send.
This is chiefly to assess how long it may still take to send messages to such filtered groups.connector_plugin
parent
da2b23f18d
commit
1937e5f1ec
|
@ -241,6 +241,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
|
public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
|
||||||
{
|
{
|
||||||
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID);
|
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID);
|
||||||
|
int groupMembersCount = groupMembers.Count;
|
||||||
|
|
||||||
if (m_messageOnlineAgentsOnly)
|
if (m_messageOnlineAgentsOnly)
|
||||||
{
|
{
|
||||||
|
@ -259,13 +260,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
HashSet<string> onlineAgentsUuidSet = new HashSet<string>();
|
HashSet<string> onlineAgentsUuidSet = new HashSet<string>();
|
||||||
Array.ForEach<PresenceInfo>(onlineAgents, pi => onlineAgentsUuidSet.Add(pi.UserID));
|
Array.ForEach<PresenceInfo>(onlineAgents, pi => onlineAgentsUuidSet.Add(pi.UserID));
|
||||||
|
|
||||||
int allMembersCount = groupMembers.Count;
|
|
||||||
groupMembers = groupMembers.Where(gmd => onlineAgentsUuidSet.Contains(gmd.AgentID.ToString())).ToList();
|
groupMembers = groupMembers.Where(gmd => onlineAgentsUuidSet.Contains(gmd.AgentID.ToString())).ToList();
|
||||||
|
|
||||||
// if (m_debugEnabled)
|
// if (m_debugEnabled)
|
||||||
m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
"[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members, {2} online",
|
// "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members, {2} online",
|
||||||
groupID, allMembersCount, groupMembers.Count());
|
// groupID, groupMembersCount, groupMembers.Count());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -275,6 +275,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
groupID, groupMembers.Count);
|
groupID, groupMembers.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int requestStartTick = Environment.TickCount;
|
||||||
|
|
||||||
foreach (GroupMembersData member in groupMembers)
|
foreach (GroupMembersData member in groupMembers)
|
||||||
{
|
{
|
||||||
if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
|
if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
|
||||||
|
@ -316,6 +318,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
ProcessMessageFromGroupSession(msg);
|
ProcessMessageFromGroupSession(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Temporary for assessing how long it still takes to send messages to large online groups.
|
||||||
|
if (m_messageOnlineAgentsOnly)
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[GROUPS-MESSAGING]: SendMessageToGroup for group {0} with {1} visible members, {2} online took {3}ms",
|
||||||
|
groupID, groupMembersCount, groupMembers.Count(), Environment.TickCount - requestStartTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region SimGridEventHandlers
|
#region SimGridEventHandlers
|
||||||
|
|
Loading…
Reference in New Issue