Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
 void test1()
 {
     CLRProfiler prof = new CLRProfiler();
 }
Esempio n. 4
0
 void test1()
 {
     CLRProfiler prof = new CLRProfiler();
 }