Skip to main content

Yandex-tank tools

Project description

https://travis-ci.org/travis-ci/travis-web.svg?branch=master https://codecov.io/gh/gaainf/tanktools/branch/master/graph/badge.svg

Yandex-tank prepare phout file with statistics after load testing. tanktools module helps to parse such files and convert to DataFrame. You can use pandas module in manual mode to handle DataFrame or use build-in functions.

So you can:

  • calc quantiles

  • get information about timings, latency, status codes

  • extract requests by timestamp, tag and other columns

  • group and analyze specific data like total/partial RPS, average request/response size

  • calc statistical metrics

Installation

pip install tanktools

Import

from tanktools import phout

Examples

Select DataFrame by timestamp

It is possible to parse a part of staistics by time and overal count

flags = {
    'from_date': '2018-01-18 20:09:50.123',
    'to_date'  : '2018-01-18 20:10:00.456',
    'limit': 100
}
data = phout.parse_phout(args.input, flags)
print("Total count: %d" % phout.size(data))
Total count: 100

Get RPS

data = phout.parse_phout('phout.log')
rps = phout.get_rps(data)

Select 200 OK responses and print latency median

data = phout.parse_phout('phout.log')
selected_http_responses = data[data.proto_code == 200]
print("Latency median for 200 OK: %d" %
      selected_http_responses.latency.median())
Latency median for 200 OK: 3539

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tanktools-1.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tanktools-1.0.2-py2-none-any.whl (5.5 kB view details)

Uploaded Python 2

File details

Details for the file tanktools-1.0.2.tar.gz.

File metadata

  • Download URL: tanktools-1.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for tanktools-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d38b94f903a9c543cb1163763f2d1cbbeb16e330b5172f5b358f0dbeb2c63911
MD5 26c943c0ea3b2e734b877b034ad9a673
BLAKE2b-256 268f8638b883323df622ee6106f1254a44aceb5ff13794dcd3d633e86e3274d2

See more details on using hashes here.

File details

Details for the file tanktools-1.0.2-py2-none-any.whl.

File metadata

  • Download URL: tanktools-1.0.2-py2-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for tanktools-1.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 b7894db572c092be0ee273b3279abc82c655bda6c19cdfd31fca2f1e9f3a3db3
MD5 7adcd7e7cfc3c8b50eecb3e325d99ff3
BLAKE2b-256 2cd487d058d5d08594ac630ede70642a29347908b0674c5ab69182e6d3563c27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page