We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 240859f commit 7100389Copy full SHA for 7100389
lightllm/server/router/model_infer/model_rpc.py
@@ -256,7 +256,7 @@ async def start_model_process(
256
),
257
)
258
proc.start()
259
-
+
260
# Use asyncio.to_thread to make the blocking wait non-blocking
261
await asyncio.to_thread(success_event.wait, timeout=40)
262
assert proc.is_alive()
lightllm/utils/tmp_utils.py
@@ -0,0 +1,12 @@
1
+from time import perf_counter
2
+from contextlib import contextmanager
3
4
5
+@contextmanager
6
+def timer(tag):
7
+ t0 = perf_counter()
8
+ try:
9
+ yield
10
+ finally:
11
+ took_time = (perf_counter() - t0) * 1000
12
+ print(f"[load-timer] {tag}: {took_time:.1f} ms", flush=True)
0 commit comments