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

Function limited_request_func

fastdeploy/benchmarks/serve.py:710–714  ·  view source on GitHub ↗
(request_func_input, pbar)

Source from the content-addressed store, hash-verified

708 semaphore = asyncio.Semaphore(max_concurrency) if max_concurrency else None
709
710 async def limited_request_func(request_func_input, pbar):
711 if semaphore is None:
712 return await request_func(request_func_input=request_func_input, pbar=pbar)
713 async with semaphore:
714 return await request_func(request_func_input=request_func_input, pbar=pbar)
715
716 benchmark_start_time = time.perf_counter()
717 tasks: list[asyncio.Task] = []

Callers 1

benchmarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected