yandex-tank-api-client示例不起作用

时间:2016-04-18 15:04:29

标签: load-testing yandex yandex-tank

我没有意识到 yandex-tank-api-client 示例的工作原理。 我在 tank-example.py 中进行了以下更正: 替换(错误是否则)

84: tsk = tankapi.shoot(*cfg)

84: tsk = tankapi.shoot(*cfg, f)

其中 f - 是函数:

def f(status, t):
    print "Status: %s" % status

我用我的文件替换了示例的load.yaml文件:

- tanks: ['localhost']
  config: ./load.ini
  log_name: task-A
  download: ['*.log','*.ini']
  upload: ['*.ammo']
  expected_codes: [0]

load.ini 的位置是:

[DEFAULT]
use_caching = 0

[phantom]
phantom_path = /home/krylov/prj/yandex/phantom/bin/phantom
phantom_modules_path = /home/krylov/prj/yandex/phantom/lib/phantom
address=localhost:8000
rps_schedule=const(10, 10s)
; Headers and URIs for GET requests

header_http = 1.1
headers = /
          [Host: 127.0.0.1]
          [Connection: close]
uris = /
       /instances
       /datastore
       /datastore-indexes

localhost 上运行 yandex-tank-api-server 并且tank-example.py script测试启动但是它无法离开 configure 阶段:

    2016-04-19 12:44:10,263 [DEBUG] Tank localhost: API returned code 200, contents:
{
    "status": "running", 
    "retcode": null, 
    "stage_completed": true, 
    "break": "configure", 
    "current_stage": "lock", 
    "tank_status": {}, 
    "failures": []
}
Status: 0

tank.log 文件以行结尾(您可以here完整 tank.log ):

2016-04-19 12:44:00,287 [INFO] yandex_tank_api.worker Changing the next break from lock to configure
2016-04-19 12:44:00,288 [WARNING] yandextank.core.tankcore Lock file present: /var/lock/lunapark_1WgKl6.lock
2016-04-19 12:44:00,288 [DEBUG] root No process[3]: [Errno 3] No such process
2016-04-19 12:44:00,288 [DEBUG] yandextank.core.tankcore Lock PID 13895 not exists, ignoring and trying to remove

我想了解为什么PID不存在。该示例是否有错误?

0 个答案:

没有答案