mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
[skip ci] Update tasks of locust on benchmark (#12961)
Signed-off-by: wangting0128 <ting.wang@zilliz.com>
This commit is contained in:
parent
07548b9709
commit
9435e37bbd
@ -55,13 +55,15 @@ class MyUser(User):
|
||||
|
||||
def locust_executor(host, port, collection_name, connection_type="single", run_params=None):
|
||||
m = MilvusClient(host=host, port=port, collection_name=collection_name)
|
||||
MyUser.tasks = {}
|
||||
# MyUser.tasks = {}
|
||||
MyUser.op_info = run_params["op_info"]
|
||||
MyUser.params = {}
|
||||
tasks = run_params["tasks"]
|
||||
for op, value in tasks.items():
|
||||
task = {eval("Tasks." + op): value["weight"]}
|
||||
MyUser.tasks.update(task)
|
||||
# task = {eval("Tasks." + op): value["weight"]}
|
||||
# MyUser.tasks.update(task)
|
||||
for i in range(int(value["weight"])):
|
||||
MyUser.tasks.append(eval("Tasks." + op))
|
||||
MyUser.params[op] = value["params"] if "params" in value else None
|
||||
logger.info(MyUser.tasks)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user