public void Trace(string type, string title) { if (profilerEnabled) { Trace(type, title, ProfilerService.ServiceData.Setting.ShowDetail ? ProfilerUtil.FormatStackTrace(new StackTrace(true)) : ""); } }
/// <summary> /// 开启一个监视块 /// </summary> internal void InnerBeginWatch(string message) { if (profilerEnabled) { if (profilerCounter > MaxItemCount) { return; } profilerCounter++; WatchItem profiler = new WatchItem(message); profiler.StackTrace = ProfilerService.ServiceData.Setting.ShowDetail ? ProfilerUtil.FormatStackTrace(new StackTrace(true)) : null; if (watchStack.Count > 0) { watchStack.Peek().Items.Add(profiler); } else { data.Watches.Add(profiler); } watchStack.Push(profiler); } }