This commit is contained in:
2020-05-31 23:56:41 +00:00
parent 8e91f0274b
commit 137d79848f
2 changed files with 143 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.Diagnostics;
using Microsoft.Extensions.Logging;
using AyaNova.Util;
@@ -93,6 +94,39 @@ namespace AyaNova.Biz
//System.Diagnostics.Debug.WriteLine("MM SAVED");
}
_lastMMSnapshot = now;
//TEST
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;
}
}
}
/////////////////////////////////////////////