Add "show eq" console command to show numbers of messages in agent event queues.

For debugging purposes.
user_profiles
Justin Clark-Casey (justincc) 2013-03-28 01:36:34 +00:00
parent f32027f3b5
commit 876d0d310f
1 changed files with 23 additions and 0 deletions

View File

@ -97,6 +97,14 @@ namespace OpenSim.Region.ClientStack.Linden
+ " >= 1 - turns on outgoing event logging\n" + " >= 1 - turns on outgoing event logging\n"
+ " >= 2 - turns on poll notification", + " >= 2 - turns on poll notification",
HandleDebugEq); HandleDebugEq);
MainConsole.Instance.Commands.AddCommand(
"Debug",
false,
"show eq",
"show eq",
"Show contents of event queues for logged in avatars. Used for debugging.",
HandleShowEq);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -148,6 +156,21 @@ namespace OpenSim.Region.ClientStack.Linden
} }
} }
protected void HandleShowEq(string module, string[] args)
{
MainConsole.Instance.OutputFormat("For scene {0}", m_scene.Name);
lock (queues)
{
foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
{
MainConsole.Instance.OutputFormat(
"For agent {0} there are {1} messages queued for send.",
kvp.Key, kvp.Value.Count);
}
}
}
/// <summary> /// <summary>
/// Always returns a valid queue /// Always returns a valid queue
/// </summary> /// </summary>