The EF DatabaseLogFormatter has a bug that results in incorrect execution times when queries are run in parallel (which would be very common for a database). This is because they are using a single Stopwatch instance which is not thread safe. Unfortunately, that means the same bug exists here too.
See dotnet/ef6#22
It won't be fixed in EF until 6.2 which is currently in beta. The EF6 changes also required other changes to the interception context so the cleanest fix may not be possible unless you're using 6.2. Otherwise, you would need to maintain state in the interceptor itself.
The EF
DatabaseLogFormatterhas a bug that results in incorrect execution times when queries are run in parallel (which would be very common for a database). This is because they are using a singleStopwatchinstance which is not thread safe. Unfortunately, that means the same bug exists here too.See dotnet/ef6#22
It won't be fixed in EF until 6.2 which is currently in beta. The EF6 changes also required other changes to the interception context so the cleanest fix may not be possible unless you're using 6.2. Otherwise, you would need to maintain state in the interceptor itself.