Example #1
0
        private TracingThreadInfo GetOrCreateTracingTreadInfo(int threadId)
        {
            if (threadsMap.ContainsKey(threadId))
            {
                return(threadsMap[threadId]);
            }

            ThreadTraceResult threadTraceResult = new ThreadTraceResult(threadId);
            TracingThreadInfo tracingThreadInfo = new TracingThreadInfo(threadTraceResult);

            return(threadsMap[threadId] = tracingThreadInfo);
        }
Example #2
0
        public int GetSummOfMethodsWorkTimes(int Indexofthread)
        {
            if (this.Threads.IsEmpty || !this.Threads.Keys.Contains(Indexofthread))
            {
                return(-1);
            }

            double            result            = 0;
            ThreadTraceResult Threadtraceresult = this.Threads[Indexofthread];

            foreach (MethodTraceResult method in Threadtraceresult.Methods)
            {
                result += Math.Round(method.WorkTime + GetSummOfInnerMethodsWorkTimes(method.Methods));
            }

            return((int)Math.Truncate(result));
        }
Example #3
0
 public TracingThreadInfo(ThreadTraceResult threadTraceResult)
 {
     ThreadTraceResult = threadTraceResult;
     TracingStack      = new Stack <TracingMethodInfo>();
     IsEmptyThread     = true;
 }