-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed as duplicate of#23630
Copy link
Labels
Description
Actual behavior
We use the new EntityFrameworkEventSource
to collect metrics about EF Core performance.
However, the counters save-changes-per-second
and total-save-changes
constantly show a value of 0
for our application.
Expected behavior
We call await dbContext.SaveChangesAsync()
in our code multiple times per second. So, we expect both values to be greater than zero.
Possible cause
I digged a bit into the source code and suspect that there's a bug here:
return await _database.SaveChangesAsync(entriesToSave, cancellationToken) |
In the async
overload of SaveChanges
the call to the EventSource is missing. Compare
EntityFrameworkEventSource.Log.SavingChanges(); |
Environment information
EF Core version: 5.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: e.g. .NET 5.0
Operating system: Docker (Linux containers)
IDE: Visual Studio Enterprise 2019 16.8.2