feat: Python(Locust) + Go(boomer) 混合压测框架(演示版)

This commit is contained in:
WbiubiuW
2026-09-22 21:35:03 +08:00
commit 26cdd4b5c1
63 changed files with 6171 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Go worker 压测时的 Locust master 入口。
master 本身不执行请求(负载由 boomer worker 产生),只需一个 User 类占位,
并复用 stats_dump 在 quitting 时落 JSON 结果。
"""
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import stats_dump # noqa: F401,E402
from locust import HttpUser, task # noqa: E402
class PlaceholderUser(HttpUser):
"""占位 User:master 不跑任务,真实 task 在 boomer worker 侧注册。"""
@task
def noop(self):
pass