MCPcopy
hub / github.com/redis/redis-py / hset

Function hset

benchmarks/cluster_async.py:78–89  ·  view source on GitHub ↗
(client, gather, data)

Source from the content-addressed store, hash-verified

76
77@timer
78async def hset(client, gather, data):
79 if gather:
80 for _ in range(count // 100):
81 await asyncio.gather(
82 *(
83 asyncio.create_task(client.hset("bench:hset", str(i), data))
84 for i in range(100)
85 )
86 )
87 else:
88 for i in range(count):
89 await client.hset("bench:hset", str(i), data)
90
91
92@timer

Callers 1

runFunction · 0.85

Calls 1

hsetMethod · 0.80

Tested by

no test coverage detected