Pyronos
Simple and sweet load testing module.
Installation
pip3 install pyronos
Command Line Interpreter (CLI)
Creates a "results" folder in the current directory to store all of the load testings.
# Simple usage.
pyronos https://my.website get 25 simple
# Send head request.
pyronos https://my.website head 25 simple
# Dump logs.
pyronos https://my.website get 25 simple -d
# Send requests sequentially.
pyronos https://my.website get 25 simple -s
# Print progress of sequential requests.
pyronos https://my.website get 25 simple -s -p
$ pyronos -h
usage: pyronos [-h] [-f {simple,stem,step}] [-o {csv,json,yml}] [-s] [-p] [-d]
[-v]
url {get,head,options,delete,post,put} num_of_reqs
Simple and sweet load testing module.
positional arguments:
url url of website
{get,head,options,delete,post,put}
http method
num_of_reqs number of requests
optional arguments:
-h, --help show this help message and exit
-f {simple,stem,step}, --figure {simple,stem,step}
type of figure
-o {csv,json,yml}, --output {csv,json,yml}
type of output
-s, --sequential sequential requests
-p, --print-progress print progress
-d, --dump-logs dump logs
-v, --version show program's version number and exit
Module
from pyronos import Pyronos
URL = 'https://my.website'
HTTP_METHOD = 'get' # or 'head', 'options', 'delete', 'post', 'put'.
NUM_OF_REQS = 25
DATA = {} # Add request body.
HEADERS = {} # Add request headers.
FIGURE = 'simple' # or 'stem', 'step'.
OUTPUT = 'csv' # or 'json', 'yml'.
SEQUENTIAL = False
PRINT_PROGRESS = False
DUMP_LOGS = True
load_tester = Pyronos(URL, HTTP_METHOD,
num_requests=NUM_OF_REQS, figure=FIGURE,
output=OUTPUT, sequential=SEQUENTIAL,
print_progress=PRINT_PROGRESS, dump_log=DUMP_LOGS)
load_tester.dispatcher() # Dispatch requests to start load testing.
Example Stem Figure
Example JSON Output
{
'starting_time': '30/12/2019 02:56:38',
'finishing_time': '30/12/2019 02:56:42',
'response_times': [0.314406, 0.268947, 0.286585, 0.303832, 0.30449, 0.276836, 0.294791, 0.308027, 0.270716, 0.289745, 0.304603, 0.276385, 0.303491, 0.29894, 0.275576], 'response_codes': [200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200],
'num_of_failed_responses': 0,
'q1': 0.2766105,
'median': 0.294791,
'q3': 0.304161,
'std': 0.014522718628258128
}