phip1611 / ttfb

Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.
MIT License
41 stars 11 forks source link

Add non-blocking functionality #47

Closed GenericNerd closed 5 months ago

GenericNerd commented 5 months ago

Currently, the library is not non-blocking and causes errors with tokio as a runtime is being created during execution. This could potentially be resolved through spawning the DNS portion with a call to tokio::task::spawn_blocking

phip1611 commented 5 months ago

Which errors do occur inside a tokio runtime?

My time currently is limited, so I can't promise anything right away

GenericNerd commented 5 months ago

Which errors do occur inside a tokio runtime?

My time currently is limited, so I can't promise anything right away

It shows that another runtime cannot be started, I don't have the exact error to hand, but it happens in the DNS portion

phip1611 commented 5 months ago

Fixing it in 0883c59b6d8fee64ce9b2d4d44c97aa2353f3d59 / #48

phip1611 commented 5 months ago

Will be released soon in v1.11

phip1611 commented 5 months ago

It's released on crates.io and in nixpkgs