Example #1
0
 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>();
        }
Example #3
0
 public void Save(ProfilerData data)
 {
     datas.Add(data);
 }