feat(lps): 로컬 워커·부하테스트(GUI) 실행 스크립트 추가 (대화형)
기존 run_local_server.sh 스타일에 맞춘 대화형 .sh 두 개. - run_local_worker.sh: 동시성(WORKER_CONCURRENCY)·Chrome 프로필(LPS_PROFILE_DIR) 선택 후 워커 기동. 실행 중 워커 감지 시 교체 여부 확인. venv/config 자동 보장. - run_loadtest_gui.sh: Locust 웹 UI(:8089) 기동. 워커 실행 중이면 경고(크롤 비용), API 미기동 시 PROCESS_COUNT 받아 백그라운드 기동(종료 시 함께 정리). 부하생성기 --processes. - .gitignore(lps): .profiles/(Chrome 쿠키·cf_clearance 세션) 커밋 방지 - README·operations: 새 스크립트 안내로 갱신 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
9c2432c818
commit
0e30354ba5
5 files changed
+164
-10
No files matched your search
+7
-2
@@ -72,7 +72,10 @@ cp config/config.local.toml.example config/config.local.toml # 값 채우기
|
||||
./run_local_server.sh # → http://localhost:9600/docs
|
||||
|
||||
# 3) 워커 실행 (실제 검색 수행) — 별도 터미널
|
||||
python worker_main.py
|
||||
./run_local_worker.sh # 대화형: 동시성·프로필 선택 (또는 python worker_main.py)
|
||||
|
||||
# (선택) 부하 테스트 GUI — Locust 웹 UI(:8089)
|
||||
./run_loadtest_gui.sh # 브라우저에서 users/spawn 조절하며 RPS/지연 관측
|
||||
```
|
||||
|
||||
간단 테스트:
|
||||
@@ -104,7 +107,9 @@ lps/
|
||||
├── web_main.py # API 서버 진입점 (요청 접수)
|
||||
├── worker_main.py # 워커 진입점 (검색+웜업+유휴정리+ops모니터)
|
||||
├── Dockerfile # API 이미지(lean) · Dockerfile.worker # 워커(Chromium+Xvfb)
|
||||
├── run_local_server.sh # 로컬 API 실행 스크립트
|
||||
├── run_local_server.sh # 로컬 API 실행 (대화형)
|
||||
├── run_local_worker.sh # 로컬 워커 실행 (대화형: 동시성·프로필)
|
||||
├── run_loadtest_gui.sh # 부하 테스트 Locust 웹 UI(:8089) 실행 (대화형)
|
||||
├── config/ # 설정(config.local.toml — 포트/DB/API키, 미커밋; 배포는 env 주입)
|
||||
├── common/ # 공통(enums, DB 세션, 모델, 로거)
|
||||
│ └── database/model/models.py # DB 테이블 정의
|
||||
|
||||
Reference in new issue
Block a user