This commit is contained in:
2020-05-31 20:26:24 +00:00
parent be77138403
commit 8e91f0274b
2 changed files with 40 additions and 1 deletions

View File

@@ -66,10 +66,45 @@ namespace AyaNova.Api.Controllers
await Task.Delay(1500);
//await Task.CompletedTask;
}
//MiniProfiler.Current.RenderPlainText()
return Content(MiniProfiler.Current.RenderPlainText());
/*
https://github.com/MiniProfiler/dotnet/blob/95eddc7d57cee9f377419733bf18e76f3e5879e5/src/MiniProfiler/MiniProfilerHandler.cs
private string ResultsList(HttpContext context)
{
if (!AuthorizeRequest(context, isList: true, message: out string message))
{
return message;
}
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);
}
return 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
}).ToJson();
}
*/
}
/// <summary>