$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>python locust config file for multiple filesclasses - Stack Overflow|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

python locust config file for multiple filesclasses - Stack Overflow

matteradmin16PV0评论

I'm using locust to do some load testing on our backend service and I have three classes defined in three different .py files

then I'm trying to run locust using this command line

==> locust -f locustfiles/locustfile.py --headless --config ../loadTestConfig.yml

locustfile.py

from myClass1 import MyClass1 
from myClass2 import MyClass2 
from myClass3 import MyClass3 

loadTestConfig.yml

    user_classes:
      - class: MyClass1
        users: 8
        spawn_rate: 8
      - class: MyClass2
        users: 2
        spawn_rate: 2
      - class: MyClass3
        users: 36
        spawn_rate: 36
    
    run_time: 2m
    host: "https://myhost"

this would give me the error when lunched that it's not recongizing the option class from the yml file.

TestConfig.yml
locust: error: ambiguous option: --=class: MyClass3 could match --locustfile, --config, --help, --version, --worker, --master, --master-host, --master-port

How could I specify per class (file) the number of user and spwan rate?? Trying to buld my load scenario.

Post a comment

comment list (0)

  1. No comments so far