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

Support timing output similar to Curl's -w option #122

Closed
marklap opened this issue Jan 11, 2013 · 14 comments
Closed

Support timing output similar to Curl's -w option #122

marklap opened this issue Jan 11, 2013 · 14 comments
Labels
enhancement New feature or enhancement

Comments

@marklap
Copy link

marklap commented Jan 11, 2013

Similar to timing output options in Curl's -w argument, and the data you see using browser debug tools that produce those pretty waterfall charts. A custom requests connection adapter might do the job.

@aseemk
Copy link

aseemk commented Sep 6, 2014

I'd love to see this, and came here just to file this request.

I personally don't need anything fancy. Just simple timing would be great. (With a way to see only timing, and not the full response body. Perhaps group it with response headers?)

In my case, my colleague discovered that time http ... was super inaccurate, because just running http added several hundred milliseconds. We now do time curl ....

(@marklap: didn't know about the -w argument to curl, thanks. As mentioned, in our case, we want to suppress the response body though, as it's heavy, and we're only interested in the time. Do you know any way to achieve that?)

@sigmavirus24
Copy link

Every response from requests has an elapsed attribute that shows the time it took to make the request. Currently 2.3.0 and 2.4.0 only show the time for the initial response, not the time it takes to download the entire response (in the case where the user does not want to stream the body, which is every case in httpie if I understand correctly). There's a bug report for that right now. The -w option would be as easy as printing response.elapsed.

@jkbrzt jkbrzt mentioned this issue Sep 8, 2014
@jkbrzt jkbrzt mentioned this issue Sep 19, 2014
@GuiSim
Copy link

GuiSim commented Sep 10, 2015

Any progress on this feature?

@jorisroovers
Copy link

Also interested in having some basic way of getting the total request+response time

@marklap
Copy link
Author

marklap commented Sep 27, 2015

I threw this together for fun. It's not awesome but it works and I think it's a bit more accurate than some other attempts (or suggestions).

https://github.com/marklap/httpie-timing

@ghost
Copy link

ghost commented Dec 25, 2015

  • 1

@doc
Copy link

doc commented Feb 1, 2017

+1

1 similar comment
@cristian0
Copy link

+1

@WalterInSH
Copy link

+1
-w argument is pretty useful

@johan-lejdung
Copy link

I'd really see a need for this, are there any plans to implement it?

@plo-
Copy link

plo- commented Feb 10, 2020

Any news?

@danieleteti
Copy link

News?

@jkbrzt
Copy link
Member

jkbrzt commented Sep 20, 2020

Canonical issue: #243

@jkbrzt jkbrzt closed this as completed Sep 20, 2020
@linpan
Copy link

linpan commented Jul 23, 2021

Canonical issue so weird

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

No branches or pull requests