Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging query execution time with logger provider #2576

Open
severisv opened this issue Aug 19, 2019 · 1 comment

Comments

@severisv
Copy link

commented Aug 19, 2019

I created a logger provider to log queries like described in the docs, which outputs the executed queries. Works great!

Is there some way I can also log the time it takes run the queries?

@roji roji added this to the Backlog milestone Aug 19, 2019

@roji

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

Not at the moment... Npgsql doesn't internally keep track of that information.

Note that #1725 adds DiagnosticListener events for command start/stop, which should make it possible to also track execution times, but that's a different system from logging.

I will keep this open in the backlog to consider adding this.

@roji roji added the enhancement label Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.