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

[Profiler] Add detailed request time desc. (dns lookup, ...) #224

Open
florianpreusner opened this issue Oct 9, 2018 · 3 comments
Open

Comments

@florianpreusner
Copy link
Member

Based on #210:

More detailed request time description: dns lookup time, connection time, etc..

@rpkamp
Copy link
Contributor

rpkamp commented Oct 18, 2019

This sounds awesome, but where could we get that information? I've searched for a bit, but couldn't find anything on how to retrieve these timings from Guzzle.

@gregurco
Copy link
Member

@rpkamp sorry for long answer. I checked and found that in RequestTimeMiddleware we're using on_stats option from guzzle. There we receive TransferStats object with handler stats info via getHandlerStats and getHandlerStat methods. That's an example of info:

Selection_033

Guzzle receives these info from curl getinfo function: https://www.php.net/manual/en/function.curl-getinfo.php

Hope it will help you 🙂

More info:
https://github.com/8p/EightPointsGuzzleBundle/blob/master/src/Middleware/RequestTimeMiddleware.php#L63
http://docs.guzzlephp.org/en/stable/request-options.html#on-stats
https://github.com/guzzle/guzzle/blob/master/src/TransferStats.php

@scion4581
Copy link

scion4581 commented Apr 6, 2023

Yeah, but how to access request time in symfony log middleware, for example, to put it in log context...

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

No branches or pull requests

4 participants