public bool IsSlow(ProfilerData data) { return(SlowEnabled && ( SlowMilliSecond > 0 && data.Duration > SlowMilliSecond || SlowDbCount > 0 && data.Traces.Count(o => o.Type == "nhibernate" || o.Type == "mongo") > SlowDbCount || SlowCacheCount > 0 && data.Traces.Count(o => o.Type == "remotecache") > SlowCacheCount )); }
ProfilerContext() { data = new ProfilerData(); var context = HttpContext.Current; if (context.IsAvailable()) { data.Url = context.Request.Url.PathAndQuery; } watchStack = new Stack <WatchItem>(); }
public void Save(ProfilerData data) { datas.Add(data); }