Skip to content

Execution times are incorrect #4

Description

@mattscully

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions