Files

22 lines
549 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""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