Skip to content

Get some time informations about a request like curl/libcurl #3439

@git001

Description

@git001

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
I have created a simple c-program to measure some http(s) timings. It's nothing fancy or rocket science but it makes the job to measure the https request time.
https://github.com/git001/c-program/blob/main/libcurl-time.c

I use the libcurl's curl_easy_getinfo function for that with one of the parameters CURLINFO_TOTAL_TIME_T.

Is there something similar in hyper or planned to add?

Describe alternatives you've considered
I have used the curl cli with the write-out parameter which is quite handy for network debugging. It would be nice to have something similar in rust.

echo |curl -sSko /dev/null --max-time 6 \
  -w "%{http_code} namelookup %{time_namelookup} connect %{time_connect} pretransfer %{time_pretransfer} starttransfer %{time_starttransfer} appconnect %{time_appconnect} total %{time_total}\n" \
  https://172.xxx.xxxx.xxx/

Additional context
No additional context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions