Skip to main content

Asynchronous HTTP Load Testing Tool with Database Storage and Betterstack Integration

Project description

AsyncLoad

AsyncLoad is an asynchronous load testing CLI designed to stress test your applications under heavy concurrent load. It contains database storage for session history as well as a Betterstack integration for monitoring and observability.


Installation

Install from pip

For version releases, use pip:

pip install AsyncLoad
asyncload -setup

Set your betterstack env variables inside the global config file thats created."%LOCALAPPDATA%/loadtester/config.env" for Windows,"~/.config/loadtester/config.env" for linux and Mac. You can setup the number of requests,concurrent requests, as well as the http method either in the config file or simply use the cmd flags to override the values. Default values for number of requests,concurrent requests,http method is 100,10,GET.   

Head over to your cmd and type:

asyncload https://httpbin.org/ -n 100 -c 10 -GET

Install from GitHub source

For building from source, install directly from the git repository:

git clone <repository-url>
cd Asyncload
pip install .
cp config.env.example config.env # set up your config file 
python -m unittest discover tests/ # Run all tests
asyncload https://httpbin.org/ -n 100 -c 10 -GET

Or Use Docker to build and run the source:

docker compose build
docker compose run --rm asyncload https://httpbin.org/ -n 100 -c 10 -GET

Running the tests

# Run all tests
python -m unittest discover tests/

# Run specific test modules
python -m unittest tests.testload
python -m unittest tests.testasync
python -m unittest tests.testdb

# Run with verbose output
python -m unittest -v tests.testload

Examples

Basic load test

asyncload https://jsonplaceholder.typicode.com/posts -n 5 -c 2 -GET
Running....
============================================================
                     Load Test Results
============================================================
Total Requests:                    5
Concurrent Requests:               2
Successful Requests:               5
Failed Requests:                   0
------------------------------------------------------------
                 Individual Request Details
------------------------------------------------------------
Request ID   | Timestamp           | URL                            | Status   | Method    | Response Time
----------------------------------------------------------------------------------------------------------
594          | 24:05:2026 14:53:36 | https://jsonplaceholder.typico | 200      | get       | 0.337788
595          | 24:05:2026 14:53:36 | https://jsonplaceholder.typico | 200      | get       | 0.392194
596          | 24:05:2026 14:53:36 | https://jsonplaceholder.typico | 200      | get       | 0.453631
597          | 24:05:2026 14:53:36 | https://jsonplaceholder.typico | 200      | get       | 0.535650
598          | 24:05:2026 14:53:36 | https://jsonplaceholder.typico | 200      | get       | 0.573828
============================================================


                   Performance Statistics
------------------------------------------------------------
Total Response Time (seconds)
  Maximum:          0.573828
  Minimum:          0.337788
  Average:          0.458618

First Byte Time (seconds)
  Maximum:          0.573208
  Minimum:          0.337749
  Average:          0.456585

Last Byte Time (seconds)
  Maximum:          0.573827
  Minimum:          0.337787
  Average:          0.458618
============================================================

Viewing history

asyncload -history
Request ID   | Timestamp           | URL                       | Status   | Method    | Response Time
-------------------------------------------------------------------------------------------------------
594          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.337788
595          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.392194
596          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.453631
597          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.535650
598          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.573828

Viewing weekly history

asyncload -history -weekly
Request ID   | Timestamp           | URL                       | Status   | Method    | Response Time    | Week
--------------------------------------------------------------------------------------------------------------
594          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.337788         | 21
595          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.392194         | 21
596          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.453631         | 21
597          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.535650         | 21
598          | 24:05:2026 14:53:36 | https://jsonplaceholder.t | 200      | get       | 0.573828         | 21

POST request with payload

asyncload https://jsonplaceholder.typicode.com/posts -n 5 -c 2 -POST -d '{"title": "foo", "body": "bar", "userId": 1}'
Running....
============================================================
                     Load Test Results
============================================================
Total Requests:                    5
Concurrent Requests:               2
Successful Requests:               5
Failed Requests:                   0
------------------------------------------------------------
                 Individual Request Details
------------------------------------------------------------
Request ID   | Timestamp           | URL                            | Status   | Method    | Response Time
----------------------------------------------------------------------------------------------------------
599          | 24:05:2026 14:56:05 | https://jsonplaceholder.typico | 201      | post      | 0.592419
600          | 24:05:2026 14:56:05 | https://jsonplaceholder.typico | 201      | post      | 1.002274
601          | 24:05:2026 14:56:05 | https://jsonplaceholder.typico | 201      | post      | 1.025395
602          | 24:05:2026 14:56:05 | https://jsonplaceholder.typico | 201      | post      | 1.347690
603          | 24:05:2026 14:56:05 | https://jsonplaceholder.typico | 201      | post      | 1.392546
============================================================


                   Performance Statistics
------------------------------------------------------------
Total Response Time (seconds)
  Maximum:          1.392546
  Minimum:          0.592419
  Average:          1.072065

First Byte Time (seconds)
  Maximum:          1.392511
  Minimum:          0.592399
  Average:          1.072046

Last Byte Time (seconds)
  Maximum:          1.392546
  Minimum:          0.592419
  Average:          1.072064
============================================================

High concurrency test

asyncload https://jsonplaceholder.typicode.com/posts -n 20 -c 10 -GET
Running....
============================================================
                     Load Test Results
============================================================
Total Requests:                   20
Concurrent Requests:              10
Successful Requests:              20
Failed Requests:                   0
------------------------------------------------------------
                 Individual Request Details
------------------------------------------------------------
Request ID   | Timestamp           | URL                            | Status   | Method    | Response Time
----------------------------------------------------------------------------------------------------------
609          | 24:05:2026 14:57:12 | https://jsonplaceholder.typico | 200      | get       | 0.395732
610          | 24:05:2026 14:57:12 | https://jsonplaceholder.typico | 200      | get       | 0.397407
...
628          | 24:05:2026 14:57:12 | https://jsonplaceholder.typico | 200      | get       | 1.824638
============================================================


                   Performance Statistics
------------------------------------------------------------
Total Response Time (seconds)
  Maximum:          1.824638
  Minimum:          0.395732
  Average:          0.861470

First Byte Time (seconds)
  Maximum:          1.824627
  Minimum:          0.383778
  Average:          0.857246

Last Byte Time (seconds)
  Maximum:          1.824638
  Minimum:          0.395731
  Average:          0.861470
============================================================

API Reference

GlobalConfig

platform_path

sets up the global config variable accordingly with the underlying os

  • "%LOCALAPPDATA%/asyncload/config.env" for Windows
  • "~/.config/asyncload/config.env" for Linux/Mac

ensure_global_config()

Creates the global config file in the user's system

Loadtester

read()

Reads the command line arguments before executing the load test.


testurl(url, numreq, conreq, reqtype, headers=None)

The core function of AsyncLoad. Sends requests to the specified URL asynchronously.

Parameters:

Name Type Description
url str The URL to test
numreq int Number of total requests
conreq int Number of concurrent requests
reqtype str HTTP method (GET, POST, PUT, DELETE, etc.)
headers dict Optional HTTP headers

insertpayload(reqlist)

Stores the return values from the requests in an SQLite database instance.

Parameters:

Name Type Description
reqlist list http request results to be stored

history(timemode=None)

Retrieves the session history from the database instance.

Parameters:

Name Type Description
timemode str Optional filter: 'weekly', 'monthly', or 'yearly'

stats(totresponsetime, firstbytetime, lastbytetime)

Calculates minimum, maximum, and average of total response time, first byte time, and last byte time.

Parameters:

Name Type Description
totresponsetime list List of total response times
firstbytetime list List of first byte times
lastbytetime list List of last byte times

desc()

Displays the load test statistics in the terminal.

Options

Flag Description
-n Number of requests
-c Number of concurrent requests
-GET / -POST / -DELETE / -PUT / -HEAD / -PATCH HTTP method
-d JSON data for POST/PUT/PATCH/DELETE
-history View session history
-history -weekly View weekly session history
-history -monthly View monthly session history
-history -yearly View yearly session history

Changelog

[1.0.0] - 2026-05-11

Added

  • Initial release of AsyncLoad
  • Asynchronous load testing CLI with concurrent request support
  • Database storage for session history using SQLite
  • Betterstack integration for monitoring and observability
  • Support for multiple HTTP methods (GET, POST, PUT, DELETE, HEAD, PATCH)
  • Configurable concurrency and request count
  • Session history viewing (weekly, monthly, yearly)
  • Load testing stats

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

asyncload-0.1.3.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

asyncload-0.1.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file asyncload-0.1.3.tar.gz.

File metadata

  • Download URL: asyncload-0.1.3.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for asyncload-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ef8fa213be6002006bfa2d9191f4cc1f3bd82829ff4113918113b6f20bfdb78e
MD5 e943b1bfc4ec91533fdd9f92b2e62fd9
BLAKE2b-256 55e8f5fe4367fe3cab2f14b228ee82fe9e4f55bfd7f71ad6ca4630c85dba5029

See more details on using hashes here.

File details

Details for the file asyncload-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: asyncload-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for asyncload-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65eb596aa55633a1157a769b6f7bae4114e6bd480e7c1befe9f4dc8bfac181c8
MD5 c025fd55f9e358bc76b10095222e9a0b
BLAKE2b-256 fd3569ed63803eecca529fb4d44fa31bfaaf8b935dc784bef7570349bd033f2f

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