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

Request time tracking #100

Closed
Faboslav opened this issue May 13, 2020 · 3 comments
Closed

Request time tracking #100

Faboslav opened this issue May 13, 2020 · 3 comments
Labels
question Further information is requested

Comments

@Faboslav
Copy link

Faboslav commented May 13, 2020

Support

Version: v2.7.0

Hello there! I didn't find any events/hooks which i could use for tracking time and other things of request. I know that i can create middleware to do this, but is there a way to track time of the request?

@System-Glitch
Copy link
Member

What do you mean exactly by "tracking time of the request"? Do you want to measure the time it takes for your app to respond?

@System-Glitch System-Glitch added the question Further information is requested label May 13, 2020
@Faboslav
Copy link
Author

Yeah, exactly that

@System-Glitch
Copy link
Member

System-Glitch commented May 13, 2020

You can indeed use a middleware for that but that won't measure the real time between when the server received the request and when the response finished writing. Your middleware would be executed in the middle of the request's life-cycle, after routing, request parsing, etc, and before finalization.

For this kind of measurement, you should probably use a benchmarker program and measure from the outside of your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants