Added get_connection_stats to pool#40
Added get_connection_stats to pool#40victoraugustolls wants to merge 3 commits intoencode:masterfrom victoraugustolls:feature/pool-connection-stats
Conversation
tests/async_tests/test_interfaces.py
Outdated
| assert http_version == b"HTTP/1.1" | ||
| assert status_code == 200 | ||
| assert reason == b"OK" | ||
| assert len(http._connections[url[:3]]) == 1 |
There was a problem hiding this comment.
Let's drop this, in favor of the assert http.get_connection_stats() == ...
tests/async_tests/test_interfaces.py
Outdated
| assert http_version == b"HTTP/1.1" | ||
| assert status_code == 200 | ||
| assert reason == b"OK" | ||
| assert len(http._connections[url[:3]]) == 1 |
There was a problem hiding this comment.
Let's drop this in favor of an http.get_connection_stats() assert.
|
Okay, so the main question here is "what we want the interface to look like for this". Eg. really we'd also like to expose which connections are HTTP/1.1 and which are HTTP/2, so perhaps we should be including that on the string too. Alternately we could be exposing a differnt kinf of interface here, eg. return a set of I think a good acid test on "have we got this right" would be to update the tests where possible to use |
|
That makes total sense, will try to work on this today / tomorrow. |
|
@tomchristie I updated the interface to include the protocol version and updated the tests. Don't think |
|
Woops! Sorry @victoraugustolls, literally just saw this PR 😳 Closing this as it's now superseded by #102, thanks 👍 |
Added
def get_connecction_stats()toConnectionPool.Second part of #18