This commit is contained in:
2020-06-01 22:16:28 +00:00
parent 9840568e02
commit 6d9bed9044
2 changed files with 36 additions and 32 deletions

View File

@@ -694,4 +694,38 @@ JAVASCRIPT DOWNSAMPLING TOOL
COlors colours for charts
http://perceptualedge.com/articles/b-eye/choosing_colors.pdf
http://perceptualedge.com/articles/b-eye/choosing_colors.pdf
MiniProfiler how to access stats from code
// This is how to access the stored profiler stats if I ever need to
// var profiler = MiniProfiler.StartNew("My Profiler Name");
// if (profiler != null)
// {
// var Options = profiler.Options;
// var guids = Options.Storage.List(100);
// // var lastId = context.Request["last-id"];
// // if (!lastId.IsNullOrWhiteSpace() && Guid.TryParse(lastId, out var lastGuid))
// // {
// // guids = guids.TakeWhile(g => g != lastGuid);
// // }
// var ministats = guids.Reverse()
// .Select(g => Options.Storage.Load(g))
// .Where(p => p != null)
// .Select(p => new
// {
// p.Id,
// p.Name,
// p.ClientTimings,
// p.Started,
// p.HasUserViewed,
// p.MachineName,
// p.User,
// p.DurationMilliseconds
// }).ToList();
// if(ministats.Count>0){
// var v=ministats.Count;
// }
// }