Command line options¶
Yandex.Tank has an obviously named executable
Here are available command line options:
show command line options
|-c CONFIG, –config=CONFIG:|
Read options from yaml file. It is possible to set multiple configuration files by specifying the option serveral times.
Ignore lock files.
Don’t wait for lock file, quit if it’s busy.
Default behaviour is to wait for lock file to become free
|-l LOG, –log=LOG:|
Main log file location.
Tank will prepare for test and wait for Enter key to start the test.
|-o OPTION, –option=OPTION:|
Set an option from command line. Options set in cmd line override those have been set in configuration files. Multiple times for multiple options.
|-s SCHEDULED_START, –scheduled-start=SCHEDULED_START:|
Run test on specified time, date format YYYY-MM-DD hh:mm:ss or hh:mm:ss
Only print WARNINGs and ERRORs to console.
Print ALL, including DEBUG, messages to console. Chatty mode.
Add an ammo file name as a nameless parameter, e.g.:
yandex-tank ammo.txt or
Configuration files organized as yaml-files. Those are files partitioned into named sections that contain ‘name: value’ records.
phantom: address: example.com:80 load_profile: load_type: rps schedule: const(100,60s) autostop: autostop: - instances(80%,10) - time(1s,10s)
A common rule: options with the same name override those set before them (in the same file or not).
Default configuration files¶
--no-rc command line option disables this behavior
Yandex.Tank reads all
/etc/yandex-tank directory, then a personal config file
So you can easily put your favourite settings in
Use indent to show that a line is a continuation of a previous one:
autostop: autostop: - time(1,10) - http(404,1%,5s) - net(xx,1,30)
Ask Yandex.Tank developers to add multiline capability for options where you need it!*
Default : milliseconds.
``30000 == 30s`` ``time(30000,120)`` is an equivalent to ``time(30s,2m)``
Time units encoding is as following:
You can also mix them:
As a result Yandex.Tank produces some files (logs, results, configs
etc). Those files are placed with care to the artifact directory. An
option for that is
artifacts_base_dir in the
tank section. It is
recommended to set it to a convenient place, for example,
~/yandex-tank-artifacts; it would be easier to manage the artifacts
phantom: address: "ya.ru:80" instances: 1000 load_profile: load_type: rps schedule: const(1,30) line(1,1000,2m) const(1000,5m) header_http: "1.1" uris: - "/" - "/test" - "/test2" headers: - "[Host: www.ya.ru]" - "[Connection: close]" autostop: autostop: - http(5xx,10%,5s)