MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / aget

Function aget

benchmark/bench.py:78–87  ·  view source on GitHub ↗
(s, url)

Source from the content-addressed store, hash-verified

76
77async def async_session_get_test(session_class, url, requests_number):
78 async def aget(s, url):
79 if session_class.__module__ == "aiohttp.client":
80 async with s.get(url) as resp:
81 return await resp.read()
82 if session_class.__name__ == "Client":
83 resp = await s.get(url)
84 return await resp.bytes()
85 else:
86 resp = await s.get(url)
87 return resp.text
88
89 try:
90 async with session_class() as s:

Callers 2

async_session_get_testFunction · 0.85

Calls 2

getMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected