EFProfiler
1.0.0
ENTITY FRAMEWORK PROFILER (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