原文地址:https://www.cnblogs.com/ideacore/p/9505425.html

官方文档: https://miniprofiler.com/dotnet/AspDotNetCore

1、添加包 MiniProfiler.AspNetCore.Mvc   和    MiniProfiler.EntityFrameworkCore

2、在 Startup.cs 中的 ConfigureServices 下添加,也可以根据官方文档中的说明进行相应的配置

services.AddMiniProfiler().AddEntityFramework();

3、在 Startup.cs 中的 Configure 下添加

app.UseMiniProfiler();

4、修改 _ViewImports.cshtml 

@using StackExchange.Profiling
@addTagHelper *, MiniProfiler.AspNetCore.Mvc

5、将MiniProfiler添加到布局文件(Shared/_Layout.cshtml)中

<mini-profiler />

最后查看效果

.Net Core使用 MiniProfiler 进行性能分析

相关文章:

  • 2021-10-12
  • 2021-08-06
  • 2021-10-05
  • 2021-09-01
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2021-08-22
  • 2021-02-07
  • 2021-11-15
  • 2019-06-15
相关资源
相似解决方案