mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Label all threadpool calls being made in core OpenSimulator. This is to add problem diagnosis.
"show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
This commit is contained in:
@@ -365,13 +365,21 @@ namespace OpenSim.Framework.Servers
|
||||
{
|
||||
List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList();
|
||||
calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value));
|
||||
int namedCallsMade = 0;
|
||||
|
||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||
foreach (KeyValuePair<string, int> kvp in calls)
|
||||
{
|
||||
cdl.AddRow(kvp.Key, kvp.Value);
|
||||
namedCallsMade += kvp.Value;
|
||||
}
|
||||
|
||||
cdl.AddRow("TOTAL NAMED", namedCallsMade);
|
||||
|
||||
long allCallsMade = Util.TotalFireAndForgetCallsMade;
|
||||
cdl.AddRow("TOTAL ANONYMOUS", allCallsMade - namedCallsMade);
|
||||
cdl.AddRow("TOTAL ALL", allCallsMade);
|
||||
|
||||
MainConsole.Instance.Output(cdl.ToString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user