davecheney / httpstat

It's like curl -v, with colours.
MIT License
7.07k stars 385 forks source link

CSV output #135

Closed 0xd3e closed 6 years ago

0xd3e commented 6 years ago

I've made some quick changes to print the results in CSV format. I need this to investigate an issue with increasing response time and I want to know which step causes this issue.

With these changes it is possible to run httpstat in a loop and write the output to a CSV file which can than be used for analyzing.

Example

$ for i in {1..20}; do httpstat -csv https://google.com >> out.csv && sleep 2; done;

This will print lines that look like this:

2,29,224,64,0,2,32,257,321,321

The columns are in the following order (HTTPS in this case):

  1. dns lookup
  2. tcp connection
  3. tls handshake
  4. server processing
  5. content transfer
  6. namelookup
  7. connect
  8. pretransfer
  9. starttransfer
  10. total

I can prepare a pull request if you think this feature is useful. The current solution is a bit quick and dirty, so I have to implement it in a proper way before.

0xd3e commented 6 years ago

I've seen now, that this project is closed and no new feature requests will be accepted. So I'll close this issue.