-
Notifications
You must be signed in to change notification settings - Fork 18
Filter
Furkan Güngör edited this page May 12, 2021
·
1 revision
Get IEasyProfilerBaseService<ProfilerPostgreSqlDbContext>
From Dependency Injection.
Or
IEasyProfilerBaseService<ProfilerSqlServerDbContext>
,
IEasyProfilerBaseService<EasyProfilerMongoDbContext>
IEasyProfilerBaseService<ProfilerMariaDbContext>
var queryProfilers = await easyProfilerService.AdvancedFilterAsync(new AdvancedFilterModel()
{
CombineWith = CombineType.Or,
Duration = new Range<TimeSpan> { Max = TimeSpan.MaxValue, Min = TimeSpan.MinValue},
Page = 1,
PerPage = 15,
Query = "Select", // <---- Contains
SortBy = Sorting.Descending, // <--- Default value Sorting.Descending,
Sort = "Duration" // <--- Default value "Duration",
QueryType = QueryType.SELECT
});
[
{
"query": "SELECT [c].[CustomerId], [c].[CreateDate], [c].[Name], [c].[Surname]\r\nFROM [Customers] AS [c]",
"duration": {
"ticks": 8737783,
"days": 0,
"hours": 0,
"milliseconds": 873,
"minutes": 0,
"seconds": 0,
"totalDays": 0.000010113174768518518,
"totalHours": 0.00024271619444444446,
"totalMilliseconds": 873.7783,
"totalMinutes": 0.014562971666666667,
"totalSeconds": 0.8737783
},
"id": "c06cae66-3dd1-4e34-810c-498c979a5c6a"
}
]
Get IEasyProfilerBaseService<TProfilerContext>
From Dependency Injection.
var slowetEndpoints = await easyProfilerService.GetSlowestEndpointsAsync();
[
{
"requestUrl": "/Default/GetAllCustomers",
"count": 25,
"avarageDurationTime": {
"ticks": 664882,
"days": 0,
"hours": 0,
"milliseconds": 66,
"minutes": 0,
"seconds": 0,
"totalDays": 7.695393518518518e-7,
"totalHours": 0.000018468944444444444,
"totalMilliseconds": 66.4882,
"totalMinutes": 0.0011081366666666668,
"totalSeconds": 0.0664882
}
},
{
"requestUrl": "/Default/InsertCustomers",
"count": 6,
"avarageDurationTime": {
"ticks": 44127,
"days": 0,
"hours": 0,
"milliseconds": 4,
"minutes": 0,
"seconds": 0,
"totalDays": 5.107291666666667e-8,
"totalHours": 0.00000122575,
"totalMilliseconds": 4.4127,
"totalMinutes": 0.000073545,
"totalSeconds": 0.0044127
}
}
]
You can try it !! Sample Project
Welcome to the EasyProfiler wiki!
Topics:
-
Getting Started
-
Databases
-
Advanced Queries
-
Other