aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/ServerBase.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-03 23:49:11 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:23:10 +0000
commit72cb1cc7d6b1dc69e959581817c70e92435d002f (patch)
tree668ceffc52aacd99512a9fe55a04e1a3e334a5bd /OpenSim/Framework/Servers/ServerBase.cs
parentJust for now, don't alert the user or log if we couldn't change their server-... (diff)
downloadopensim-SC_OLD-72cb1cc7d6b1dc69e959581817c70e92435d002f.zip
opensim-SC_OLD-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.gz
opensim-SC_OLD-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.bz2
opensim-SC_OLD-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.xz
Add "show threadpool calls" command to show count of all labelled smartthreadpool calls
Diffstat (limited to 'OpenSim/Framework/Servers/ServerBase.cs')
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index fd56587..379e224 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Diagnostics; 30using System.Diagnostics;
31using System.IO; 31using System.IO;
32using System.Linq;
32using System.Reflection; 33using System.Reflection;
33using System.Text; 34using System.Text;
34using System.Text.RegularExpressions; 35using System.Text.RegularExpressions;
@@ -292,6 +293,12 @@ namespace OpenSim.Framework.Servers
292 HandleDebugThreadpoolLevel); 293 HandleDebugThreadpoolLevel);
293 294
294 m_console.Commands.AddCommand( 295 m_console.Commands.AddCommand(
296 "Debug", false, "show threadpool calls",
297 "show threadpool calls",
298 "Show the number of labelled threadpool calls.",
299 HandleShowThreadpoolCalls);
300
301 m_console.Commands.AddCommand(
295 "Debug", false, "force gc", 302 "Debug", false, "force gc",
296 "force gc", 303 "force gc",
297 "Manually invoke runtime garbage collection. For debugging purposes", 304 "Manually invoke runtime garbage collection. For debugging purposes",
@@ -354,6 +361,20 @@ namespace OpenSim.Framework.Servers
354 Notice("serialosdreq is now {0}", setSerializeOsdRequests); 361 Notice("serialosdreq is now {0}", setSerializeOsdRequests);
355 } 362 }
356 363
364 private void HandleShowThreadpoolCalls(string module, string[] args)
365 {
366 List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList();
367 calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value));
368
369 ConsoleDisplayList cdl = new ConsoleDisplayList();
370 foreach (KeyValuePair<string, int> kvp in calls)
371 {
372 cdl.AddRow(kvp.Key, kvp.Value);
373 }
374
375 MainConsole.Instance.Output(cdl.ToString());
376 }
377
357 private void HandleDebugThreadpoolStatus(string module, string[] args) 378 private void HandleDebugThreadpoolStatus(string module, string[] args)
358 { 379 {
359 int workerThreads, iocpThreads; 380 int workerThreads, iocpThreads;