D
D
dumbdumb2019-09-12 08:10:20
stress testing
dumbdumb, 2019-09-12 08:10:20

How to calculate cartridge length for Yandex.Tank?

There is a hand-shaped cartridge for Yandex.Tank.

POST /some/path HTTP/1.1
Host: some.host
Content-Length: 169
Connection: Close

{
  "some": "json"
}

According to the documentation and examples, the first line of ammo.txt should be the size of the request. After calculating the byte size of the text from the request, I got the number 271. To this, I get an error from the Tank, saying that this number is incorrect:
<class 'yandextank.stepper.module_exceptions.AmmoFileError'>: Error while reading ammo file. Position: 4, header: '271', original exception: list index out of range

After going through the examples, I understand that the lengths of the requests in the examples do not correspond to the values ​​​​that I counted for these requests. Obviously I'm doing something wrong.
load.yaml just in case:
phantom:
#  ssl: true
  address: some.host
#  port: '443'
  port: '80'

  load_profile:
    load_type: rps
    schedule: const(100, 5m)

  timeout: '60'
  instances: 100500

  ammo_type: uripost
  ammofile: ammo.txt

uploader:
  enabled: true
  package: yandextank.plugins.DataUploader
  api_address: https://overload.yandex.net
  token_file: token.txt
  job_name: "test"
  job_dsc: "test"

autostop:
  autostop:
    - net(110, 10, 5)
    - http(503, 10, 5)

telegraf:
  enabled: false

Question: how to calculate the size of a POST request already compiled by hand?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dumbdumb, 2019-09-12
@dumbdumb

Added a marker after the request size:

yyy marker
POST ...

And Tank gave me a "read xxx bytes instead of yyy" error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question