EFProfiler
1.0.0
Профилировщик фреймворта (EFProfiler) - это инструмент для поиска медленных запросов
pm> Install-Package EFProfiler
Вы также можете просмотреть страницу пакета на Nuget.
Вы должны добавить эту конфигурацию в файле appsetting.js:
"EFProfilerSetting": {
"MaxMillisecond": 100,
"Path": "wwwroot\LogFile\",
"ActiveLog": true,
"EFProfilerUIOptions": {
"RoutePrefix": "efprofiler",
"DocumentTitle": "EFProfiler UI",
"HeadContent": "EFProfiler",
"Authorization": {
"Roles": "admin",
"Users": ""
}
}
}
Добавьте класс запуска требуемых сервисов, как ниже:
services.AddDbContext(options =>
{
options.UseSqlServer(_configuration.GetConnectionString("DataContext"));
options.AddInterceptors(_configuration);
});
Чтобы отобразить журналы:
app.EFProfilerUI(_configuration);
Настройка авторизации панели панели:
app.UseAuthentication();
app.UseAuthorization();
app.EFProfilerUI(_configuration);
Затем введите следующий адрес в браузере:
https://{sitename}/efprofiler/index.html