hyper-util: get info about if the connection is reused in Connected
#3835
Labels
A-client
Area: client.
C-feature
Category: feature. This is adding a new feature.
K-hyper-util
Crate: hyper-util
Is your feature request related to a problem? Please describe.
hyper_util::client::legacy::connect::capture_connection
grants us the ability to capture theConnected
structure after a connection has established. But we cannot tell whether the connection is reused fromConnected
, which is quite helpful. E.g. when debugging slow requests, whether the request established a new connection or reused a connection from the pool is an important metric.Describe the solution you'd like
Add a field
is_reused
inConnected
, and expose that information through a method ofConnected
.With this, we can get the connection reuse info like this:
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: