MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / limited_request_func

Function limited_request_func

benchmarks/benchmark_serving.py:448–452  ·  view source on GitHub ↗
(request_func_input, pbar)

Source from the content-addressed store, hash-verified

446 semaphore = asyncio.Semaphore(max_concurrency) if max_concurrency else None
447
448 async def limited_request_func(request_func_input, pbar):
449 if semaphore is None:
450 return await request_func(request_func_input=request_func_input, pbar=pbar)
451 async with semaphore:
452 return await request_func(request_func_input=request_func_input, pbar=pbar)
453
454 tasks: list[asyncio.Task] = []
455 benchmark_start_time = time.perf_counter()

Callers 1

benchmarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected