aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/ServerBase.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-04 00:55:48 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:23:10 +0000
commitec8d21c434a39f46518ee9cf9f5539d1790eacc0 (patch)
tree2aa340fb34c6f6e8e8f2e31c2034b5841307a7bf /OpenSim/Framework/Servers/ServerBase.cs
parentAdd "show threadpool calls" command to show count of all labelled smartthread... (diff)
downloadopensim-SC-ec8d21c434a39f46518ee9cf9f5539d1790eacc0.zip
opensim-SC-ec8d21c434a39f46518ee9cf9f5539d1790eacc0.tar.gz
opensim-SC-ec8d21c434a39f46518ee9cf9f5539d1790eacc0.tar.bz2
opensim-SC-ec8d21c434a39f46518ee9cf9f5539d1790eacc0.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index 379e224..eb9fb8b 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -365,13 +365,21 @@ namespace OpenSim.Framework.Servers
365 { 365 {
366 List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList(); 366 List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList();
367 calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value)); 367 calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value));
368 int namedCallsMade = 0;
368 369
369 ConsoleDisplayList cdl = new ConsoleDisplayList(); 370 ConsoleDisplayList cdl = new ConsoleDisplayList();
370 foreach (KeyValuePair<string, int> kvp in calls) 371 foreach (KeyValuePair<string, int> kvp in calls)
371 { 372 {
372 cdl.AddRow(kvp.Key, kvp.Value); 373 cdl.AddRow(kvp.Key, kvp.Value);
374 namedCallsMade += kvp.Value;
373 } 375 }
374 376
377 cdl.AddRow("TOTAL NAMED", namedCallsMade);
378
379 long allCallsMade = Util.TotalFireAndForgetCallsMade;
380 cdl.AddRow("TOTAL ANONYMOUS", allCallsMade - namedCallsMade);
381 cdl.AddRow("TOTAL ALL", allCallsMade);
382
375 MainConsole.Instance.Output(cdl.ToString()); 383 MainConsole.Instance.Output(cdl.ToString());
376 } 384 }
377 385