<reponame>Gelbpunkt/zangy<filename>bench/bench_aioredis_get.py<gh_stars>1-10
import asyncio
import aioredis
import uvloop
from tqdm.asyncio import tqdm

uvloop.install()

async def main():
    pool = await aioredis.create_redis_pool("redis://localhost", minsize=10, maxsize=10)
    await pool.set("bench", "yes")
    async for i in tqdm(range(1000000), desc="Getting keys..."):
        await pool.get("bench")


asyncio.run(main())

import asyncio
import aioredis
import uvloop
from tqdm.asyncio import tqdm

uvloop.install()

async def main():
    pool = await aioredis.create_redis_pool("redis://localhost", minsize=10, maxsize=10)
    await pool.set("bench", "yes")
    async for i in tqdm(range(1000000), desc="Getting keys..."):
        await pool.get("bench")


asyncio.run(main())