This commit is contained in:
2026-09-19 19:45:43 +08:00
parent 7183cb45f8
commit 8131b158b4
60 changed files with 7669 additions and 909 deletions

View File

@@ -1,4 +1,4 @@
"""Offline microbenchmarks; run with .venv/Scripts/python benchmarks/hotpaths.py."""
"""Offline microbenchmarks; run with `py -3.14 -B labs/benchmarks/hotpaths.py`."""
import sys
from datetime import datetime, time
@@ -6,7 +6,8 @@ from pathlib import Path
from statistics import median
from timeit import repeat
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
# labs/benchmarks/ -> 仓库根 -> py-client
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "py-client"))
from libs.calc import trading_time
from sdk.models import _parse_datetime, _side