Load and performance benchmark tool

Overview

Yandex Tank Build Status Gitter

Yandextank has been moved to Python 3.

Latest stable release for Python 2 here.

Yandex.Tank is an extensible open source load testing tool for advanced linux users which is especially good as a part of an automated load testing suite

Quantiles chart example

Main features

  • different load generators supported:
    • Evgeniy Mamchits' phantom is a very fast (100 000+ RPS) shooter written in C++ (default)
    • JMeter is an extendable and widely known one
    • BFG is a Python-based generator that allows you to write your load scenarios in Python
    • experimental Golang generator: pandora
  • performance analytics backend service: Overload. Store and analyze your test results online
  • several ammo formats supported like plain url list or access.log
  • test autostop plugin: stop your test when the results have became obvious and save time
  • customizable and extendable monitoring that works over SSH

Documentation

Get help

Chat with authors and other performance specialists: Gitter

See also

Comments
  • Can't install on Ubuntu Server 12.04

    Can't install on Ubuntu Server 12.04

    Install clear Ubuntu Server 12.04 64-bit

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 12.04 LTS
    Release:    12.04
    Codename:   precise
    $ uname -a
    Linux stamm-ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    $ cat /etc/apt/sources.list.d/tank.list 
    # Ubuntu Precise
    deb http://mirror.yandex.ru/mirrors/tank common main
    deb http://mirror.yandex.ru/mirrors/tank precise main
    
    $ sudo apt-get update
    Ign http://mirror.yandex.ru common InRelease
    Ign http://mirror.yandex.ru precise InRelease                               
    Ign http://mirror.yandex.ru common Release.gpg                               
    Ign http://mirror.yandex.ru precise Release.gpg                              
    Ign http://mirror.yandex.ru common Release                                   
    Ign http://mirror.yandex.ru precise Release                                  
    Ign http://mirror.yandex.ru common/main TranslationIndex                     
    Ign http://mirror.yandex.ru precise/main TranslationIndex                    
    Err http://mirror.yandex.ru common/main amd64 Packages                       
      404  Not Found
    Err http://mirror.yandex.ru common/main i386 Packages                        
      404  Not Found
    Err http://mirror.yandex.ru precise/main amd64 Packages                      
      404  Not Found
    Err http://mirror.yandex.ru precise/main i386 Packages                       
      404  Not Found
    Ign http://mirror.yandex.ru common/main Translation-en_US                    
    Ign http://mirror.yandex.ru common/main Translation-en                       
    Ign http://mirror.yandex.ru precise/main Translation-en_US                   
    Ign http://mirror.yandex.ru precise/main Translation-en                      
    Ign http://ru.archive.ubuntu.com precise InRelease                           
    Ign http://ru.archive.ubuntu.com precise-updates InRelease                   
    Ign http://ru.archive.ubuntu.com precise-backports InRelease                 
    Hit http://ru.archive.ubuntu.com precise Release.gpg                         
    Hit http://ru.archive.ubuntu.com precise-updates Release.gpg
    Hit http://ru.archive.ubuntu.com precise-backports Release.gpg
    Hit http://ru.archive.ubuntu.com precise Release
    Hit http://ru.archive.ubuntu.com precise-updates Release                            
    Hit http://ru.archive.ubuntu.com precise-backports Release                          
    Hit http://ru.archive.ubuntu.com precise/main Sources                               
    Hit http://ru.archive.ubuntu.com precise/restricted Sources                         
    Hit http://ru.archive.ubuntu.com precise/universe Sources                           
    Hit http://ru.archive.ubuntu.com precise/multiverse Sources                         
    Hit http://ru.archive.ubuntu.com precise/main amd64 Packages                        
    Hit http://ru.archive.ubuntu.com precise/restricted amd64 Packages                  
    Hit http://ru.archive.ubuntu.com precise/universe amd64 Packages                    
    Hit http://ru.archive.ubuntu.com precise/multiverse amd64 Packages                  
    Hit http://ru.archive.ubuntu.com precise/main i386 Packages                         
    Hit http://ru.archive.ubuntu.com precise/restricted i386 Packages                   
    Hit http://ru.archive.ubuntu.com precise/universe i386 Packages                     
    Hit http://ru.archive.ubuntu.com precise/multiverse i386 Packages                   
    Hit http://ru.archive.ubuntu.com precise/main TranslationIndex                      
    Hit http://ru.archive.ubuntu.com precise/multiverse TranslationIndex                
    Hit http://ru.archive.ubuntu.com precise/restricted TranslationIndex                
    Hit http://ru.archive.ubuntu.com precise/universe TranslationIndex                  
    Hit http://ru.archive.ubuntu.com precise-updates/main Sources                       
    Hit http://ru.archive.ubuntu.com precise-updates/restricted Sources                 
    Hit http://ru.archive.ubuntu.com precise-updates/universe Sources                   
    Hit http://ru.archive.ubuntu.com precise-updates/multiverse Sources                 
    Hit http://ru.archive.ubuntu.com precise-updates/main amd64 Packages                
    Hit http://ru.archive.ubuntu.com precise-updates/restricted amd64 Packages          
    Hit http://ru.archive.ubuntu.com precise-updates/universe amd64 Packages
    Hit http://ru.archive.ubuntu.com precise-updates/multiverse amd64 Packages          
    Hit http://ru.archive.ubuntu.com precise-updates/main i386 Packages                 
    Hit http://ru.archive.ubuntu.com precise-updates/restricted i386 Packages           
    Hit http://ru.archive.ubuntu.com precise-updates/universe i386 Packages             
    Hit http://ru.archive.ubuntu.com precise-updates/multiverse i386 Packages           
    Hit http://ru.archive.ubuntu.com precise-updates/main TranslationIndex              
    Hit http://ru.archive.ubuntu.com precise-updates/multiverse TranslationIndex        
    Hit http://ru.archive.ubuntu.com precise-updates/restricted TranslationIndex        
    Hit http://ru.archive.ubuntu.com precise-updates/universe TranslationIndex          
    Hit http://ru.archive.ubuntu.com precise/main Translation-en 
    Hit http://ru.archive.ubuntu.com precise/multiverse Translation-en
    Hit http://ru.archive.ubuntu.com precise/restricted Translation-en
    Hit http://ru.archive.ubuntu.com precise/universe Translation-en
    Hit http://ru.archive.ubuntu.com precise-updates/main Translation-en
    Hit http://ru.archive.ubuntu.com precise-updates/multiverse Translation-en
    Hit http://ru.archive.ubuntu.com precise-updates/restricted Translation-en
    Hit http://ru.archive.ubuntu.com precise-backports/main Sources
    Hit http://ru.archive.ubuntu.com precise-backports/restricted Sources
    Hit http://ru.archive.ubuntu.com precise-backports/universe Sources
    Hit http://ru.archive.ubuntu.com precise-backports/multiverse Sources
    Hit http://ru.archive.ubuntu.com precise-backports/main amd64 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/restricted amd64 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/universe amd64 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/multiverse amd64 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/main i386 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/restricted i386 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/universe i386 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/multiverse i386 Packages
    Hit http://ru.archive.ubuntu.com precise-backports/main TranslationIndex
    Hit http://ru.archive.ubuntu.com precise-backports/multiverse TranslationIndex
    Hit http://ru.archive.ubuntu.com precise-backports/restricted TranslationIndex
    Hit http://ru.archive.ubuntu.com precise-backports/universe TranslationIndex
    Hit http://ru.archive.ubuntu.com precise-updates/universe Translation-en
    Hit http://ru.archive.ubuntu.com precise-backports/main Translation-en
    Hit http://ru.archive.ubuntu.com precise-backports/multiverse Translation-en
    Hit http://ru.archive.ubuntu.com precise-backports/restricted Translation-en
    Hit http://ru.archive.ubuntu.com precise-backports/universe Translation-en
    Ign http://security.ubuntu.com precise-security InRelease    
    Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
    Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
    Get:3 http://security.ubuntu.com precise-security/main Sources [32.4 kB]
    Get:4 http://security.ubuntu.com precise-security/restricted Sources [14 B]
    Get:5 http://security.ubuntu.com precise-security/universe Sources [7,849 B]
    Get:6 http://security.ubuntu.com precise-security/multiverse Sources [713 B]
    Get:7 http://security.ubuntu.com precise-security/main amd64 Packages [118 kB]
    Get:8 http://security.ubuntu.com precise-security/restricted amd64 Packages [14 B]
    Get:9 http://security.ubuntu.com precise-security/universe amd64 Packages [26.6 kB]
    Get:10 http://security.ubuntu.com precise-security/multiverse amd64 Packages [1,155 B]
    Get:11 http://security.ubuntu.com precise-security/main i386 Packages [121 kB]
    Get:12 http://security.ubuntu.com precise-security/restricted i386 Packages [14 B]                                                                                                                                                                                                                                                                                      
    Get:13 http://security.ubuntu.com precise-security/universe i386 Packages [26.8 kB]                                                                                                                                                                                                                                                                                     
    Get:14 http://security.ubuntu.com precise-security/multiverse i386 Packages [1,394 B]                                                                                                                                                                                                                                                                                   
    Hit http://security.ubuntu.com precise-security/main TranslationIndex                                                                                                                                                                                                                                                                                                   
    Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex                                                                                                                                                                                                                                                                                             
    Hit http://security.ubuntu.com precise-security/restricted TranslationIndex                                                                                                                                                                                                                                                                                             
    Hit http://security.ubuntu.com precise-security/universe TranslationIndex                                                                                                                                                                                                                                                                                               
    Hit http://security.ubuntu.com precise-security/main Translation-en                                                                                                                                                                                                                                                                                                     
    Hit http://security.ubuntu.com precise-security/multiverse Translation-en                                                                                                                                                                                                                                                                                               
    Hit http://security.ubuntu.com precise-security/restricted Translation-en                                                                                                                                                                                                                                                                                               
    Hit http://security.ubuntu.com precise-security/universe Translation-en                                                                                                                                                                                                                                                                                                 
    Fetched 385 kB in 7s (52.8 kB/s)                                                                                                                                                                                                                                                                                                                                        
    W: Failed to fetch http://mirror.yandex.ru/mirrors/tank/dists/common/main/binary-amd64/Packages  404  Not Found
    
    W: Failed to fetch http://mirror.yandex.ru/mirrors/tank/dists/common/main/binary-i386/Packages  404  Not Found
    
    W: Failed to fetch http://mirror.yandex.ru/mirrors/tank/dists/precise/main/binary-amd64/Packages  404  Not Found
    
    W: Failed to fetch http://mirror.yandex.ru/mirrors/tank/dists/precise/main/binary-i386/Packages  404  Not Found
    
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    
    $ sudo apt-get install yandex-load-tank-base
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package yandex-load-tank-base
    
    opened by stamm 14
  • I can`t install yandex-tank on ubuntu 16.04 LTS

    I can`t install yandex-tank on ubuntu 16.04 LTS

    I read many any guids, but was i shut without tank i see these text in terminal:

    user1@VMubuntu:$ yandex-tank /home/user1/Документы/dir/load.ini 14:54:42 [WARNING] /etc/yandex-tank is not accessible to get configs list 14:54:42 [INFO] Loading configs... 14:54:42 [INFO] Loading plugins... 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.ResourceCheck' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/ResourceCheck/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.ShellExec' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/ShellExec/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.Phantom' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.Aggregator' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Aggregator/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.Autostop' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Autostop/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.Monitoring' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Monitoring/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.Console' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Console/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.TipsAndTricks' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/TipsAndTricks/init.pyc'>. Should be 'Plugin' 14:54:42 [WARNING] Deprecated plugin classname: <module 'yandextank.plugins.RCAssert' from '/usr/local/lib/python2.7/dist-packages/yandextank/plugins/RCAssert/init.pyc'>. Should be 'Plugin' 14:54:42 [INFO] Performing test 14:54:42 [INFO] Configuring plugins... 14:54:42 [WARNING] Failed TCP connection test using [127.0.0.1]:80 14:54:42 [WARNING] Failed TCP connection test using [127.0.0.1]:80 14:54:42 [WARNING] Failed TCP connection test using [127.0.0.1]:80 14:54:42 [INFO] Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 261, in perform_test self.core.plugins_configure() File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 133, in plugins_configure plugin.configure() File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/plugin.py", line 92, in configure self.phantom.read_config() File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 96, in read_config stream.read_config() File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 265, in read_config self.address, do_test_connect, explicit_port) File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 428, in resolve raise RuntimeError(msg % address_str) RuntimeError: All connection attempts failed for 127.0.0.1, use phantom.connection_test=0 to disable it

    14:54:42 [ERROR] All connection attempts failed for 127.0.0.1, use phantom.connection_test=0 to disable it 14:54:42 [INFO] Trying to shutdown gracefully... 14:54:42 [INFO] Finishing test... 14:54:42 [ERROR] Failed finishing plugin <yandextank.plugins.Aggregator.plugin.AggregatorPlugin object at 0x7f1c83f8ddd0>: 'AggregatorPlugin' object has no attribute 'drain' 14:54:42 [INFO] Finishing monitoring 14:54:42 [INFO] Post-processing test... 14:54:42 [INFO] Artifacts dir: logs/2016-08-22_14-54-42.9UOmX_ 14:54:42 [INFO] Done graceful shutdown 14:54:42 [INFO] Close allocated resources... 14:54:42 [INFO] Done performing test with code 1

    What can I do from these? I want use yandex-tank...

    P.S. Russian version: Установил яндекс танк в соответствии со всеми гайдами, но всё равно когда я стреляю из танка в терминале сыпятся ошибки. Всё перепробовал, что можно сделать чтобы починить танк? Мне необходимо просто из него пострелять.

    opened by nigthmare17931 11
  • Нет yandex-tank-jmeter в docker hub

    Нет yandex-tank-jmeter в docker hub

    При запуске по документации http://yandextank.readthedocs.io/en/latest/install.html

    docker run \
        -v $(pwd):/var/loadtest \
        -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent \
        --net host \
        -it direvius/yandex-tank-jmeter
    

    Получаю ошибку: docker: Error response from daemon: pull access denied for direvius/yandex-tank-jmeter, repository does not exist or may require 'docker login'.

    В docker залогиненный. Поиск по докер хабу, тоже не дал результатов.

    opened by dubrovin 9
  • Лок-файл захватывается до чтения конфигурации

    Лок-файл захватывается до чтения конфигурации

    evg@thinkpad ~ $yandex-tank -f -v
    /usr/lib64/python2.7/site-packages/pandas/core/computation/__init__.py:18: UserWarning: The installed version of numexpr 2.4.4.dev0 is not supported in pandas and will be not be used
    The minimum supported version is 2.4.6
    
      ver=ver, min_ver=_MIN_NUMEXPR_VERSION), UserWarning)
    2017-07-02 05:49:50,626 [ERROR] root cli.py:91	Exception: Lock file present, cannot continue
    2017-07-02 05:49:50,628 [DEBUG] root cli.py:92	Exception: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/yandextank/core/cli.py", line 87, in main
        worker.configure()
      File "/usr/lib/python2.7/site-packages/yandextank/core/consoleworker.py", line 190, in configure
        raise RuntimeError("Lock file present, cannot continue")
    RuntimeError: Lock file present, cannot continue
    
    [1]    22264 exit 1     yandex-tank -f -v
    evg@thinkpad ~ $yandex-tank -f -v -c non-existing.ini
    /usr/lib64/python2.7/site-packages/pandas/core/computation/__init__.py:18: UserWarning: The installed version of numexpr 2.4.4.dev0 is not supported in pandas and will be not be used
    The minimum supported version is 2.4.6
    
      ver=ver, min_ver=_MIN_NUMEXPR_VERSION), UserWarning)
    2017-07-02 05:49:58,689 [ERROR] root cli.py:91	Exception: Lock file present, cannot continue
    2017-07-02 05:49:58,690 [DEBUG] root cli.py:92	Exception: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/yandextank/core/cli.py", line 87, in main
        worker.configure()
      File "/usr/lib/python2.7/site-packages/yandextank/core/consoleworker.py", line 190, in configure
        raise RuntimeError("Lock file present, cannot continue")
    RuntimeError: Lock file present, cannot continue
    

    Пытался запустить танк от простого пользователя - вижу что не захватывается лок-файл. Прописывание в ~/.yandex-tank или местный .ini в секцию [tank] не помогает - локальный .ini-файл даже не обязан существовать.

    opened by evgkrsk 9
  • 404/Console/Overload

    404/Console/Overload

    @iskhakovan "Добрый день. Пробую использовать яндекс танк из контейнера докера. При завершении стрельбы появляется ошибка HTTPError: 404 Client Error: NOT FOUND for url: https://overload.yandex.net/api/job/292/summary.json?api_token="

    2016-08-25 07:32:55,295 [DEBUG] yandextank.plugins.Overload.client client.py:37 Making request to: https://overload.yandex.net/api/job/292/close.json?api_token=&exitcode=23
    2016-08-25 07:32:55,359 [DEBUG] yandextank.plugins.Overload.client client.py:43 Raw response: [{"success": 1}]
    2016-08-25 07:32:55,359 [DEBUG] yandextank.plugins.Overload.client client.py:49 Response: [{u'success': 1}]
    2016-08-25 07:32:55,359 [INFO] yandextank.plugins.Overload.plugin plugin.py:259 Web link: https://overload.yandex.net/292
    2016-08-25 07:32:55,359 [DEBUG] yandextank.core.tankcore tankcore.py:316        Searching for plugin: <class 'yandextank.plugins.Autostop.plugin.AutostopPlugin'>
    2016-08-25 07:32:55,359 [DEBUG] yandextank.plugins.Overload.client client.py:37 Making request to: https://overload.yandex.net/api/job/292/summary.json?api_token=
    2016-08-25 07:32:55,392 [ERROR] yandextank.core.tankcore tankcore.py:223        Failed post-processing plugin <yandextank.plugins.Overload.plugin.Plugin object at 0x7efd8fcd0f10>: 404 Client Error: NOT FOU$
    2016-08-25 07:32:55,395 [DEBUG] yandextank.core.tankcore tankcore.py:225        Failed post-processing plugin: Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 219, in plugins_post_process
        retcode = plugin.post_process(retcode)
      File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Overload/plugin.py", line 276, in post_process
        self.jobno, rps, autostop.cause_criterion.explain())
      File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Overload/client.py", line 149, in set_imbalance_and_dsc
        res = self.get_job_summary(jobno)
      File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Overload/client.py", line 112, in get_job_summary
        + self.api_token)
      File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Overload/client.py", line 47, in get
        resp = self.get_raw(addr)
      File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Overload/client.py", line 41, in get_raw
        resp.raise_for_status()
      File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 862, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    HTTPError: 404 Client Error: NOT FOUND for url: https://overload.yandex.net/api/job/292/summary.json?api_token=
    
    
    opened by doctornkz 9
  • Fixing log collection for monitoring plugin and StepperWrapper.

    Fixing log collection for monitoring plugin and StepperWrapper.

    Monitoring plugin stores configs files like monitoring_default_*.xml in current working directory, and so does StepperWrapper with access.log_*.stpd and access.log_*.stpd_si.json files.

    opened by vovapi 8
  • Fix Monitoring.collector

    Fix Monitoring.collector

    The xml.etree.ElementTree.find/findall method don't need the root element in path.

    // сломал мониторинг при выпиливании lxml, надо было все-таки нормально проверить // test coming soon...

    opened by ei-grad 8
  • First run

    First run

    Use this config, like in example

    load = const(1,20s)
    
    address=87.250.250.203:80
    header_host = ya.ru
    
    header_http = 1.1
    header_connection = close
    uri = /
    

    I get «400 Bad Request» of all http queries.

    I guess it's nginx block queries, maybe need to add some another headers?

    opened by stamm 8
  • Gevent-based BFG worker

    Gevent-based BFG worker

    What this patch lets you to do: New BFG option worker_type. If it's green, the new worker will be used instead of the existing purely multiprocessing one. This worker spawns bfg.instances worker processes, but this number should be kept law (eg. number of CPU cores). Every worker process will spawn bfg.green_threads_per_instance greenlets, which effectively do just the same as workers in the current implementation: wait for tasks and execute.

    I've made a simple tests runner, which uses ultimate BFG with urllib3 requests inside. Here are two test result. I also have telegraf client on my machine (which runs the Yandex.Tank), so you can look at Memory, CPU, context switches, interrupts and other stuff happening on my machine while executing tests.

    1. Original worker, 1200 instances https://overload.yandex.net/10486
    2. Green worker, 4 instances, 300 greenlets per instance https://overload.yandex.net/10484

    As you can see, green worker consumes significantly less memory (~100Mb vs. ~10Gb). Also result on the old workere are very unstable at the beginning, as it takes much time to start all the processes, it consumes CPU and affects existing workers. And I can't use more than 1500 instances with old worker, as it eats all RAM, hits swap heavily and my machine dies slowly :) With green worker I tried 10k greenlets - no problems detected.

    If somebody finds this PR useful and candidate to be merged - I'll update documentation and some other stuff in this PR.

    opened by Flid 7
  • 422 http response show as 71 Protocol error

    422 http response show as 71 Protocol error

    our rest service use for validation exception 422 code, but when we try use yandex-tank for load testing we show response in cli as 71 Protocol error. when we change status code to other (for ex 200) all ok

    And in phout_*.log we see 1445969781.301 #0 25897 79 24 25611 183 25615 97 765 71 0 1445969782.301 #1 6642 67 13 6456 106 6456 97 765 71 0 1445969783.301 #2 6812 82 24 6595 111 6596 97 765 71 0

    how we can show proper status code in our load test?

    load.ini [tank] artifacts_base_dir=../../../trash/ [phantom] address=127.0.0.1 port=80 ;target's port rps_schedule=step(1,5,1,3m) ;load scheme ammofile=ammo.txt

    ammo.txt 89 GET /api/accounts HTTP/1.1 User-agent: Tank Accept: application/json Host: ololo-pew-pew

    opened by ant-hill 7
  • Installing tank on RHEL 6.6 caused ERROR: Import by filename is not supported.

    Installing tank on RHEL 6.6 caused ERROR: Import by filename is not supported.

    Hi, I have tried to install tank on RHEL 6.6 following these instructions 1 and 2. When launching yandex-tank got following exception:

    # yandex-tank
    18:28:52 INFO: No config passed via cmdline, using ./load.ini
    18:28:52 INFO: Loading configs...
    18:28:52 INFO: Loading plugins...
    18:28:52 INFO: Exception: Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/yandextank/core/consoleworker.py", line 224, in configure
        self.core.load_plugins()
      File "/usr/lib/python2.6/site-packages/yandextank/core/tankcore.py", line 242, in load_plugins
        plugin = il.import_module(plugin_path)
      File "/usr/lib/python2.6/site-packages/importlib/__init__.py", line 37, in import_module
        __import__(name)
    ImportError: Import by filename is not supported.
    18:28:52 ERROR: Import by filename is not supported.
    18:28:52 ERROR: Exception: Import by filename is not supported.
    

    I'm not good either in linux nor python so will be grateful for the help

    My load.ini

    [tank]
    plugin_web=Tank/Plugins/WebOnline.py
    plugin_console=Tank/Plugins/ConsoleOnline.py
    plugin_ShellExec=Tank/Plugins/ShellExec.py
    plugin_phantom=Tank/Plugins/Phantom.py
    plugin_aggreg=Tank/Plugins/Aggregator.py
    
    [phantom]
    address=google.ru
    port=80
    rps_schedule=const(2, 2m)
    headers = [Host: google.ru] [Connection: close] [Bloody: yes]
    uris=/
    
    [web]
    port = 80
    interval = 5
    manualstop = 1
    

    Without [tank] section it works with no errors.

    opened by RocketRaccoon 7
  • malloc: Cannot allocate memory

    malloc: Cannot allocate memory

    Hi folks,

    I'm trying to load test a high response time API (~15s) so need to keep a lot of connections. When phantom instances: are 30k and higher, tank starts to fail with a lot of malloc errors:

    2022-12-05 17:47:26.057 +0000 [error] [benchmark_io 32714] mprotect: Cannot allocate memory
    2022-12-05 17:47:26.058 +0000 [error] [benchmark_io 32715] mmap: Cannot allocate memory
    2022-12-05 17:47:26.058 +0000 [error] [benchmark_io 32716] mmap: Cannot allocate memory
    2022-12-05 17:47:26.058 +0000 [error] [benchmark_io 32717] mmap: Cannot allocate memory
    2022-12-05 17:47:26.058 +0000 [error] [benchmark_io 32718] mmap: Cannot allocate memory
    

    Running the latest master version with docker. The machine has a lot of available memory.

    Are there any limitations to number of instances? Can this me remedied?

    opened by IvanVas 0
  • Update Docker build to avoid OpenSSL problems

    Update Docker build to avoid OpenSSL problems

    On the latest Debian, the tank run resulted in the error below. This image addition fixes it.

    Traceback (most recent call last):
      File "/usr/local/bin/yandex-tank", line 5, in <module>
        from yandextank.core.cli import main
      File "/usr/local/lib/python3.8/dist-packages/yandextank/core/__init__.py", line 4, in <module>
        from .tankcore import TankCore  # noqa
      File "/usr/local/lib/python3.8/dist-packages/yandextank/core/tankcore.py", line 25, in <module>
        from yandextank.plugins.DataUploader.client import LPRequisites
      File "/usr/local/lib/python3.8/dist-packages/yandextank/plugins/DataUploader/__init__.py", line 1, in <module>
        from .plugin import Plugin  # noqa
      File "/usr/local/lib/python3.8/dist-packages/yandextank/plugins/DataUploader/plugin.py", line 18, in <module>
        import requests
      File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
        from urllib3.contrib import pyopenssl
      File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
        import OpenSSL.SSL
      File "/usr/local/lib/python3.8/dist-packages/OpenSSL/__init__.py", line 8, in <module>
        from OpenSSL import crypto, SSL
      File "/usr/local/lib/python3.8/dist-packages/OpenSSL/crypto.py", line 1550, in <module>
        class X509StoreFlags(object):
      File "/usr/local/lib/python3.8/dist-packages/OpenSSL/crypto.py", line 1570, in X509StoreFlags
        CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
    AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
    
    opened by IvanVas 0
  • JMeter tests cannot started

    JMeter tests cannot started

    After some interface changes in TimeChopper the JMeter tests starts failing.

    <class 'TypeError'>: object of type 'generator' has no len() self.recent_ts = [0] * len(self.sources)

    TimeChopper(self._read_stat_queue(), 3)) TypeError: __init__() takes 2 positional arguments but 3 were given

    opened by gnomeby 1
  • Jmeter does not connect when yandex-tank starts

    Jmeter does not connect when yandex-tank starts

    When I run yandex-tank -c load.yaml the terminal displays the following error:

    Traceback (most recent call last):
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "/usr/local/lib/python3.8/dist-packages/yandextank/core/consoleworker.py", line 197, in run
        self.retcode = self.core.wait_for_finish()
      File "/usr/local/lib/python3.8/dist-packages/yandextank/common/util.py", line 845, in __exit__
        retcode = self.worker.core.plugins_end_test(retcode)
      File "/usr/local/lib/python3.8/dist-packages/yandextank/core/tankcore.py", line 315, in plugins_end_test
        retcode = self.job.aggregator.end_test(retcode)
      File "/usr/local/lib/python3.8/dist-packages/yandextank/aggregator/tank_aggregator.py", line 124, in end_test
        retcode = self.generator.end_test(retcode)
      File "/usr/local/lib/python3.8/dist-packages/yandextank/plugins/JMeter/plugin.py", line 168, in end_test
        self.reader.close()
    AttributeError: 'NoneType' object has no attribute 'close'
    

    I am using Jmeter + Yandex Tank. In Jmeter a simple HTTP Request to a server.

    Yandex Tank load.yaml:

    overload:
            enabled: true
            package: yandextank.plugins.DataUploader
            token_file: token.txt
            job_name: Y-Tank Stress Test
            job_dsc: Test load
    
    
    jmeter:
            enabled: true
            package: yandextank.plugins.JMeter
            jmx: test.jmx
            jmeter_path: /home/dev/programs/apache-jmeter-5.4.1/bin/jmeter
            buffered_seconds: 0
            ext_log: none
            variables:
                    protocol: https
                    host: server.com
                    path: /
                    thread_rpm: 5
                    loops: 1
    
    
    phantom:
            enabled: false
    
    console:
            enabled: true
    
    telegraf:
            enabled: false
    
    opened by DevidzeIL 0
  • Get 'No JSON object could be decoded' when running tank with overload plugin

    Get 'No JSON object could be decoded' when running tank with overload plugin

    Get next error:

    15:49:14 [INFO] Preparing test...
    15:49:14 [INFO] Checking tank resources...
    15:49:14 [INFO] Using OVERLOAD backend
    15:49:14 [INFO] Read authentication token from /var/loadtest/token.txt, token length is 32 bytes
    15:49:14 [INFO] Proxy not set
    15:49:14 [INFO] Detected target: somehost.com
    15:49:14 [WARNING] Failed to create job on lunapark
    15:49:14 [WARNING] ValueError('No JSON object could be decoded',)
    15:49:14 [ERROR] 
    15:49:14 [ERROR] Failed to connect to Lunapark, disabling DataUploader
    

    When run yandex tank inside docker with overload integration.

    Here's the config

    overload:
      enabled: true
      operator: Kirill
      package: yandextank.plugins.DataUploader
      token_file: "/var/loadtest/token.txt"
      job_name: Test
      job_dsc: Basic load scenario
    

    And a run command:

    docker run \
        -v $(pwd):/var/loadtest \
        -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent \
        --net host \
        -it direvius/yandex-tank
    
    opened by Kirill380 0
Releases(Python2)
Owner
Yandex
Yandex open source projects and technologies
Yandex
Scalable user load testing tool written in Python

Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst

Locust.io 15.3k Feb 8, 2021
Load Testing ML Microservices for Robustness and Scalability

The demo is aimed at getting started with load testing a microservice before taking it to production. We use FastAPI microservice (to predict weather) and Locust to load test the service (locally or on cloud). You can find detailed instructions in the Engineering MLOps book.

Emmanuel Raj 13 Jul 5, 2022
Generates realistic traffic for load testing tile servers

Generates realistic traffic for load testing tile servers. Useful for: Measuring throughput, latency and concurrency of your tile serving stack. Ident

Brandon Liu 23 Dec 5, 2022
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom

hey is a tiny program that sends some load to a web application. hey was originally called boom and was influenced from Tarek Ziade's tool at tarekzia

Jaana Dogan 14.9k Jan 7, 2023
The evaluator covering all of the metrics required by tasks within the DUE Benchmark.

DUE Evaluator The repository contains the evaluator covering all of the metrics required by tasks within the DUE Benchmark, i.e., set-based F1 (for KI

DUE Benchmark 4 Jan 21, 2022
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

Mimesis - Fake Data Generator Description Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes

Isaak Uchakaev 3.8k Dec 29, 2022
Python scripts for a generic performance testing infrastructure using Locust.

TODOs Reference to published paper or online version of it loadtest_plotter.py: Cleanup and reading data from files ARS_simulation.py: Cleanup, docume

Juri Tomak 3 Dec 15, 2022
Data App Performance Tests

Data App Performance Tests My hypothesis is that The different architectures of

Marc Skov Madsen 6 Dec 14, 2022
A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax

1.0 Release See here for details about breaking changes with the upcoming 1.0 release: https://github.com/taverntesting/tavern/issues/495 Easier API t

null 909 Dec 15, 2022
A modern API testing tool for web applications built with Open API and GraphQL specifications.

Schemathesis Schemathesis is a modern API testing tool for web applications built with Open API and GraphQL specifications. It reads the application s

Schemathesis.io 1.6k Jan 6, 2023
Automatic SQL injection and database takeover tool

sqlmap sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of

sqlmapproject 25.7k Jan 4, 2023
A modern API testing tool for web applications built with Open API and GraphQL specifications.

Schemathesis Schemathesis is a modern API testing tool for web applications built with Open API and GraphQL specifications. It reads the application s

Schemathesis.io 1.6k Dec 30, 2022
Command line driven CI frontend and development task automation tool.

tox automation project Command line driven CI frontend and development task automation tool At its core tox provides a convenient way to run arbitrary

tox development team 3.1k Jan 4, 2023
AutoExploitSwagger is an automated API security testing exploit tool that can be combined with xray, BurpSuite and other scanners.

AutoExploitSwagger is an automated API security testing exploit tool that can be combined with xray, BurpSuite and other scanners.

null 6 Jan 28, 2022
HTTP client mocking tool for Python - inspired by Fakeweb for Ruby

HTTPretty 1.0.5 HTTP Client mocking tool for Python created by Gabriel Falcão . It provides a full fake TCP socket module. Inspired by FakeWeb Github

Gabriel Falcão 2k Jan 6, 2023
HTTP client mocking tool for Python - inspired by Fakeweb for Ruby

HTTPretty 1.0.5 HTTP Client mocking tool for Python created by Gabriel Falcão . It provides a full fake TCP socket module. Inspired by FakeWeb Github

Gabriel Falcão 1.9k Feb 6, 2021
Language-agnostic HTTP API Testing Tool

Dredd — HTTP API Testing Framework Dredd is a language-agnostic command-line tool for validating API description document against backend implementati

Apiary 4k Jan 5, 2023
A complete test automation tool

Golem - Test Automation Golem is a test framework and a complete tool for browser automation. Tests can be written with code in Python, codeless using

null 486 Dec 30, 2022
Python wrapper of Android uiautomator test tool.

uiautomator This module is a Python wrapper of Android uiautomator testing framework. It works on Android 4.1+ (API Level 16~30) simply with Android d

xiaocong 1.9k Dec 30, 2022