[CL-snapshots-parallel] parallelize performance snapshots (audit R6) #372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/claude-snapshots-parallel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Что сделано
PerformanceSnapshotService.capture_snapshots(app/services/performance_snapshots.py, audit R6): per-strategy цикл (fetch trades + save) распараллелен — извлёк тело в_snapshot_one_strategy, fan-outasyncio.gather+Semaphore(8).Зачем
Раньше юзер с N стратегиями платил N× per-strategy round-trip на 6-часовом snapshot-daemon тике (последовательные fetch+save).
gatherсохраняет порядок входа → результаты в том же порядке стратегий; per-strategy вычисление метрик не тронуто (работа независима).План тестирования
test_performance_snapshots_parallel: peak concurrency > 1 (было 1), order-preservation, semaphore-bound (max <= _SNAPSHOT_CONCURRENCY=8). 2 red→green.Где могу ошибаться