je_load_density.wrapper.proxy.proxy_user

Classes

LocustUserProxy()

Locust 使用者代理容器 Locust User Proxy Container

class je_load_density.wrapper.proxy.proxy_user.LocustUserProxy

Bases: object

Locust 使用者代理容器 Locust User Proxy Container

用來保存並管理 FastHTTPUser 與 HTTPUser 的代理。 Used to store and manage FastHTTPUser and HTTPUser proxies.

get_user(user_type: str) Any

取得指定類型的使用者代理 Get specified user proxy

Parameters:

user_type – “fast_http_user” 或 “http_user”

Returns:

對應的使用者代理 (Corresponding user proxy)

set_user(user_type: str, user_instance: Any) None

設定或替換使用者代理 Set or replace user proxy

Parameters:
  • user_type – 使用者類型 (User type key)

  • user_instance – 使用者代理實例 (User proxy instance)