public void Can_dump_tracked_threads() { var factory = new NamedThreadFactory("Can_dump_managed_threads"); var thread = factory.New(() => { while (true) { Debug.Assert("This".Equals("This")); } }); thread.Start(); Console.WriteLine(CLRProfiler.DumpTrackedThreads()); }
/// <summary> /// A text/plain dump of all threads and their stack traces /// </summary> public ActionResult Threads(string username, string password) { if (!IsAuthorized(username, password)) { return(null); } var result = new ContentResult { Content = CLRProfiler.DumpTrackedThreads(), ContentType = "text/plain", ContentEncoding = Encoding.UTF8 }; return(result); }
void test1() { CLRProfiler prof = new CLRProfiler(); }