AsyncLoad 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- asyncload-0.1.2/AsyncLoad.egg-info/PKG-INFO +252 -0
- asyncload-0.1.2/AsyncLoad.egg-info/SOURCES.txt +17 -0
- asyncload-0.1.2/AsyncLoad.egg-info/dependency_links.txt +1 -0
- asyncload-0.1.2/AsyncLoad.egg-info/entry_points.txt +2 -0
- asyncload-0.1.2/AsyncLoad.egg-info/requires.txt +15 -0
- asyncload-0.1.2/AsyncLoad.egg-info/top_level.txt +1 -0
- asyncload-0.1.2/CHANGELOG.md +62 -0
- asyncload-0.1.2/LICENSE +21 -0
- asyncload-0.1.2/MANIFEST.in +14 -0
- asyncload-0.1.2/PKG-INFO +252 -0
- asyncload-0.1.2/README.MD +185 -0
- asyncload-0.1.2/config.env.example +7 -0
- asyncload-0.1.2/pyproject.toml +91 -0
- asyncload-0.1.2/requirements.txt +5 -0
- asyncload-0.1.2/setup.cfg +4 -0
- asyncload-0.1.2/tests/__init__.py +0 -0
- asyncload-0.1.2/tests/test_async.py +57 -0
- asyncload-0.1.2/tests/test_db.py +328 -0
- asyncload-0.1.2/tests/test_load.py +266 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AsyncLoad
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Asynchronous HTTP Load Testing Tool with Database Storage and Betterstack Integration
|
|
5
|
+
Author-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
|
|
6
|
+
Maintainer-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2025 Your Name
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Project-URL: Homepage, https://github.com/Saptarshi2001/AsyncLoad
|
|
30
|
+
Project-URL: Documentation, https://github.com/Saptarshi2001/AsyncLoad#readme
|
|
31
|
+
Project-URL: Repository, https://github.com/Saptarshi2001/AsyncLoad
|
|
32
|
+
Project-URL: Issues, https://github.com/Saptarshi2001/AsyncLoad/issues
|
|
33
|
+
Project-URL: Changelog, https://github.com/Saptarshi2001/AsyncLoad/blob/main/CHANGELOG.md
|
|
34
|
+
Keywords: load-testing,http,async,aiohttp,performance,monitoring,betterstack
|
|
35
|
+
Classifier: Development Status :: 4 - Beta
|
|
36
|
+
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: Intended Audience :: System Administrators
|
|
38
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
39
|
+
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
|
40
|
+
Classifier: Topic :: System :: Benchmark
|
|
41
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
42
|
+
Classifier: Programming Language :: Python :: 3
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
48
|
+
Classifier: Operating System :: OS Independent
|
|
49
|
+
Classifier: Framework :: AsyncIO
|
|
50
|
+
Requires-Python: >=3.7
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
License-File: LICENSE
|
|
53
|
+
Requires-Dist: aiohttp>=3.7.0
|
|
54
|
+
Requires-Dist: requests>=2.25.0
|
|
55
|
+
Requires-Dist: python-dotenv>=0.15.0
|
|
56
|
+
Requires-Dist: logtail-python>=0.3.4
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Requires-Dist: pytest>=6.0.0; extra == "dev"
|
|
59
|
+
Requires-Dist: pytest-asyncio>=0.14.0; extra == "dev"
|
|
60
|
+
Requires-Dist: coverage>=5.0.0; extra == "dev"
|
|
61
|
+
Requires-Dist: black>=21.0.0; extra == "dev"
|
|
62
|
+
Requires-Dist: flake8>=3.8.0; extra == "dev"
|
|
63
|
+
Provides-Extra: test
|
|
64
|
+
Requires-Dist: pytest>=6.0.0; extra == "test"
|
|
65
|
+
Requires-Dist: pytest-asyncio>=0.14.0; extra == "test"
|
|
66
|
+
Dynamic: license-file
|
|
67
|
+
|
|
68
|
+
# AsyncLoad
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Installation
|
|
75
|
+
|
|
76
|
+
### Install from pip
|
|
77
|
+
|
|
78
|
+
For version releases, use pip:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install async-load-tester
|
|
82
|
+
asyncload -setup
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Head over to your cmd and type:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Install from GitHub source
|
|
94
|
+
|
|
95
|
+
For building from source, install directly from the git repository:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone <repository-url>
|
|
99
|
+
cd Asyncload
|
|
100
|
+
pip install .
|
|
101
|
+
cp config.env.example config.env # set up your config file
|
|
102
|
+
python -m unittest discover tests/ # Run all tests
|
|
103
|
+
asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Or Use Docker to build and run the source:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
docker compose build
|
|
110
|
+
docker compose run --rm asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Running the tests
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Run all tests
|
|
118
|
+
python -m unittest discover tests/
|
|
119
|
+
|
|
120
|
+
# Run specific test modules
|
|
121
|
+
python -m unittest tests.testload
|
|
122
|
+
python -m unittest tests.testasync
|
|
123
|
+
python -m unittest tests.testdb
|
|
124
|
+
|
|
125
|
+
# Run with verbose output
|
|
126
|
+
python -m unittest -v tests.testload
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Examples
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Basic GET request
|
|
137
|
+
asyncload https://jsonplaceholder.typicode.com/posts -n 1000 -c 50 -GET
|
|
138
|
+
|
|
139
|
+
# Test user creation endpoint
|
|
140
|
+
asyncload https://reqres.in/api/users -n 100 -c 10 -POST -d '{"name": "John Doe", "job": "developer"}'
|
|
141
|
+
|
|
142
|
+
# High concurrency test
|
|
143
|
+
asyncload https://httpbin.org/delay/1 -n 1000 -c 100 -GET
|
|
144
|
+
|
|
145
|
+
# Stress test with timeout
|
|
146
|
+
asyncload https://httpbin.org/delay/2 -n 100 -c 10 -GET
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## API Reference
|
|
154
|
+
|
|
155
|
+
### ensure_global_config()
|
|
156
|
+
|
|
157
|
+
Creates the global config file in the user's system
|
|
158
|
+
|
|
159
|
+
### read()
|
|
160
|
+
|
|
161
|
+
Reads the command line arguments before executing the load test.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### testurl(url, numreq, conreq, reqtype, headers=None)
|
|
166
|
+
|
|
167
|
+
The core function of AsyncLoad. Sends requests to the specified URL asynchronously.
|
|
168
|
+
|
|
169
|
+
**Parameters:**
|
|
170
|
+
|
|
171
|
+
| Name | Type | Description |
|
|
172
|
+
|------|------|-------------|
|
|
173
|
+
| `url` | `str` | The URL to test |
|
|
174
|
+
| `numreq` | `int` | Number of total requests |
|
|
175
|
+
| `conreq` | `int` | Number of concurrent requests |
|
|
176
|
+
| `reqtype` | `str` | HTTP method (GET, POST, PUT, DELETE, etc.) |
|
|
177
|
+
| `headers` | `dict` | Optional HTTP headers |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### insertpayload(reqlist)
|
|
182
|
+
|
|
183
|
+
Stores the return values from the requests in an SQLite database instance.
|
|
184
|
+
|
|
185
|
+
**Parameters:**
|
|
186
|
+
|
|
187
|
+
| Name | Type | Description |
|
|
188
|
+
|------|------|-------------|
|
|
189
|
+
| `reqlist` | `list` | List of request results to store |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### history(timemode=None)
|
|
194
|
+
|
|
195
|
+
Retrieves the session history from the database instance.
|
|
196
|
+
|
|
197
|
+
**Parameters:**
|
|
198
|
+
|
|
199
|
+
| Name | Type | Description |
|
|
200
|
+
|------|------|-------------|
|
|
201
|
+
| `timemode` | `str` | Optional filter: 'weekly', 'monthly', or 'yearly' |
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### stats(totresponsetime, firstbytetime, lastbytetime)
|
|
206
|
+
|
|
207
|
+
Calculates minimum, maximum, and average of total response time, first byte time, and last byte time.
|
|
208
|
+
|
|
209
|
+
**Parameters:**
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description |
|
|
212
|
+
|------|------|-------------|
|
|
213
|
+
| `totresponsetime` | `list` | List of total response times |
|
|
214
|
+
| `firstbytetime` | `list` | List of first byte times |
|
|
215
|
+
| `lastbytetime` | `list` | List of last byte times |
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### desc()
|
|
221
|
+
|
|
222
|
+
Displays the load test statistics in the terminal.
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Options
|
|
227
|
+
|
|
228
|
+
| Flag | Description |
|
|
229
|
+
|------|-------------|
|
|
230
|
+
| `-n` | Number of requests |
|
|
231
|
+
| `-c` | Number of concurrent requests |
|
|
232
|
+
| `-GET` / `-POST` / `-DELETE` / `-PUT` / `-HEAD` / `-PATCH` | HTTP method |
|
|
233
|
+
| `-d` | JSON data for POST/PUT/PATCH/DELETE |
|
|
234
|
+
| `-history` | View session history |
|
|
235
|
+
| `-history -weekly` | View weekly session history |
|
|
236
|
+
| `-history -monthly` | View monthly session history |
|
|
237
|
+
| `-history -yearly` | View yearly session history |
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Changelog
|
|
242
|
+
|
|
243
|
+
### [1.0.0] - 2026-05-11
|
|
244
|
+
#### Added
|
|
245
|
+
- Initial release of AsyncLoad
|
|
246
|
+
- Asynchronous load testing CLI with concurrent request support
|
|
247
|
+
- Database storage for session history using SQLite
|
|
248
|
+
- Betterstack integration for monitoring and observability
|
|
249
|
+
- Support for multiple HTTP methods (GET, POST, PUT, DELETE, HEAD, PATCH)
|
|
250
|
+
- Configurable concurrency and request count
|
|
251
|
+
- Session history viewing (weekly, monthly, yearly)
|
|
252
|
+
- Load testing stats
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
CHANGELOG.md
|
|
2
|
+
LICENSE
|
|
3
|
+
MANIFEST.in
|
|
4
|
+
README.MD
|
|
5
|
+
config.env.example
|
|
6
|
+
pyproject.toml
|
|
7
|
+
requirements.txt
|
|
8
|
+
AsyncLoad.egg-info/PKG-INFO
|
|
9
|
+
AsyncLoad.egg-info/SOURCES.txt
|
|
10
|
+
AsyncLoad.egg-info/dependency_links.txt
|
|
11
|
+
AsyncLoad.egg-info/entry_points.txt
|
|
12
|
+
AsyncLoad.egg-info/requires.txt
|
|
13
|
+
AsyncLoad.egg-info/top_level.txt
|
|
14
|
+
tests/__init__.py
|
|
15
|
+
tests/test_async.py
|
|
16
|
+
tests/test_db.py
|
|
17
|
+
tests/test_load.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dist
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Initial release of PyLoad - Asynchronous HTTP Load Testing Tool
|
|
11
|
+
- Support for GET, POST, PUT, DELETE, PATCH HTTP methods
|
|
12
|
+
- Concurrent request handling with configurable limits
|
|
13
|
+
- SQLite database storage for test results
|
|
14
|
+
- Loki integration for failure logging and monitoring
|
|
15
|
+
- Comprehensive statistics calculation (min, max, average response times)
|
|
16
|
+
- History mode for viewing past test results
|
|
17
|
+
- Command-line interface with flexible argument parsing
|
|
18
|
+
- Async/await implementation using aiohttp
|
|
19
|
+
- Environment-based configuration
|
|
20
|
+
- Comprehensive test suite with unit and integration tests
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
- Real-time response time metrics (first byte, last byte, total)
|
|
24
|
+
- Configurable request timeouts
|
|
25
|
+
- Error handling and logging
|
|
26
|
+
- Database schema with proper indexing
|
|
27
|
+
- Betterstack integration for centralized monitoring
|
|
28
|
+
|
|
29
|
+
### Technical Details
|
|
30
|
+
- Python 3.7+ compatibility
|
|
31
|
+
- Asynchronous I/O operations
|
|
32
|
+
- SQLite database backend
|
|
33
|
+
- RESTful API testing capabilities
|
|
34
|
+
- Extensible architecture for custom monitoring integrations
|
|
35
|
+
|
|
36
|
+
## [0.1.0] - 2025-01-09
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- Complete implementation of async load testing functionality
|
|
40
|
+
- Database operations for result storage and retrieval
|
|
41
|
+
- Loki logging integration for failure monitoring
|
|
42
|
+
- Comprehensive test coverage
|
|
43
|
+
- Documentation and packaging setup
|
|
44
|
+
- CLI interface with argument validation
|
|
45
|
+
|
|
46
|
+
### Dependencies
|
|
47
|
+
- aiohttp>=3.7.0
|
|
48
|
+
- requests>=2.25.0
|
|
49
|
+
- python-dotenv>=0.15.0
|
|
50
|
+
- logtail>=1.0.1
|
|
51
|
+
### Testing
|
|
52
|
+
- Unit tests for all core functionality
|
|
53
|
+
- Integration tests with real API calls
|
|
54
|
+
- Mocked database operations for reliable testing
|
|
55
|
+
- Async test support with proper fixtures
|
|
56
|
+
|
|
57
|
+
### Packaging
|
|
58
|
+
- setuptools-based distribution
|
|
59
|
+
- pyproject.toml for modern Python packaging
|
|
60
|
+
- Comprehensive MANIFEST.in for file inclusion
|
|
61
|
+
- MIT License
|
|
62
|
+
- Complete README with usage examples
|
asyncload-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Your Name
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include README.MD
|
|
2
|
+
include requirements.txt
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include config.env.example
|
|
6
|
+
recursive-include tests *.py
|
|
7
|
+
global-exclude *.pyc
|
|
8
|
+
global-exclude __pycache__
|
|
9
|
+
global-exclude *.pyo
|
|
10
|
+
global-exclude .pytest_cache
|
|
11
|
+
global-exclude .coverage
|
|
12
|
+
global-exclude *.db
|
|
13
|
+
global-exclude console.log
|
|
14
|
+
global-exclude config.env
|
asyncload-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AsyncLoad
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Asynchronous HTTP Load Testing Tool with Database Storage and Betterstack Integration
|
|
5
|
+
Author-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
|
|
6
|
+
Maintainer-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2025 Your Name
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Project-URL: Homepage, https://github.com/Saptarshi2001/AsyncLoad
|
|
30
|
+
Project-URL: Documentation, https://github.com/Saptarshi2001/AsyncLoad#readme
|
|
31
|
+
Project-URL: Repository, https://github.com/Saptarshi2001/AsyncLoad
|
|
32
|
+
Project-URL: Issues, https://github.com/Saptarshi2001/AsyncLoad/issues
|
|
33
|
+
Project-URL: Changelog, https://github.com/Saptarshi2001/AsyncLoad/blob/main/CHANGELOG.md
|
|
34
|
+
Keywords: load-testing,http,async,aiohttp,performance,monitoring,betterstack
|
|
35
|
+
Classifier: Development Status :: 4 - Beta
|
|
36
|
+
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: Intended Audience :: System Administrators
|
|
38
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
39
|
+
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
|
40
|
+
Classifier: Topic :: System :: Benchmark
|
|
41
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
42
|
+
Classifier: Programming Language :: Python :: 3
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
48
|
+
Classifier: Operating System :: OS Independent
|
|
49
|
+
Classifier: Framework :: AsyncIO
|
|
50
|
+
Requires-Python: >=3.7
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
License-File: LICENSE
|
|
53
|
+
Requires-Dist: aiohttp>=3.7.0
|
|
54
|
+
Requires-Dist: requests>=2.25.0
|
|
55
|
+
Requires-Dist: python-dotenv>=0.15.0
|
|
56
|
+
Requires-Dist: logtail-python>=0.3.4
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Requires-Dist: pytest>=6.0.0; extra == "dev"
|
|
59
|
+
Requires-Dist: pytest-asyncio>=0.14.0; extra == "dev"
|
|
60
|
+
Requires-Dist: coverage>=5.0.0; extra == "dev"
|
|
61
|
+
Requires-Dist: black>=21.0.0; extra == "dev"
|
|
62
|
+
Requires-Dist: flake8>=3.8.0; extra == "dev"
|
|
63
|
+
Provides-Extra: test
|
|
64
|
+
Requires-Dist: pytest>=6.0.0; extra == "test"
|
|
65
|
+
Requires-Dist: pytest-asyncio>=0.14.0; extra == "test"
|
|
66
|
+
Dynamic: license-file
|
|
67
|
+
|
|
68
|
+
# AsyncLoad
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Installation
|
|
75
|
+
|
|
76
|
+
### Install from pip
|
|
77
|
+
|
|
78
|
+
For version releases, use pip:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install async-load-tester
|
|
82
|
+
asyncload -setup
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Head over to your cmd and type:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Install from GitHub source
|
|
94
|
+
|
|
95
|
+
For building from source, install directly from the git repository:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone <repository-url>
|
|
99
|
+
cd Asyncload
|
|
100
|
+
pip install .
|
|
101
|
+
cp config.env.example config.env # set up your config file
|
|
102
|
+
python -m unittest discover tests/ # Run all tests
|
|
103
|
+
asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Or Use Docker to build and run the source:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
docker compose build
|
|
110
|
+
docker compose run --rm asyncload https://httpbin.org/ -n 100 -c 10 -GET
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Running the tests
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Run all tests
|
|
118
|
+
python -m unittest discover tests/
|
|
119
|
+
|
|
120
|
+
# Run specific test modules
|
|
121
|
+
python -m unittest tests.testload
|
|
122
|
+
python -m unittest tests.testasync
|
|
123
|
+
python -m unittest tests.testdb
|
|
124
|
+
|
|
125
|
+
# Run with verbose output
|
|
126
|
+
python -m unittest -v tests.testload
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Examples
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Basic GET request
|
|
137
|
+
asyncload https://jsonplaceholder.typicode.com/posts -n 1000 -c 50 -GET
|
|
138
|
+
|
|
139
|
+
# Test user creation endpoint
|
|
140
|
+
asyncload https://reqres.in/api/users -n 100 -c 10 -POST -d '{"name": "John Doe", "job": "developer"}'
|
|
141
|
+
|
|
142
|
+
# High concurrency test
|
|
143
|
+
asyncload https://httpbin.org/delay/1 -n 1000 -c 100 -GET
|
|
144
|
+
|
|
145
|
+
# Stress test with timeout
|
|
146
|
+
asyncload https://httpbin.org/delay/2 -n 100 -c 10 -GET
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## API Reference
|
|
154
|
+
|
|
155
|
+
### ensure_global_config()
|
|
156
|
+
|
|
157
|
+
Creates the global config file in the user's system
|
|
158
|
+
|
|
159
|
+
### read()
|
|
160
|
+
|
|
161
|
+
Reads the command line arguments before executing the load test.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### testurl(url, numreq, conreq, reqtype, headers=None)
|
|
166
|
+
|
|
167
|
+
The core function of AsyncLoad. Sends requests to the specified URL asynchronously.
|
|
168
|
+
|
|
169
|
+
**Parameters:**
|
|
170
|
+
|
|
171
|
+
| Name | Type | Description |
|
|
172
|
+
|------|------|-------------|
|
|
173
|
+
| `url` | `str` | The URL to test |
|
|
174
|
+
| `numreq` | `int` | Number of total requests |
|
|
175
|
+
| `conreq` | `int` | Number of concurrent requests |
|
|
176
|
+
| `reqtype` | `str` | HTTP method (GET, POST, PUT, DELETE, etc.) |
|
|
177
|
+
| `headers` | `dict` | Optional HTTP headers |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### insertpayload(reqlist)
|
|
182
|
+
|
|
183
|
+
Stores the return values from the requests in an SQLite database instance.
|
|
184
|
+
|
|
185
|
+
**Parameters:**
|
|
186
|
+
|
|
187
|
+
| Name | Type | Description |
|
|
188
|
+
|------|------|-------------|
|
|
189
|
+
| `reqlist` | `list` | List of request results to store |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### history(timemode=None)
|
|
194
|
+
|
|
195
|
+
Retrieves the session history from the database instance.
|
|
196
|
+
|
|
197
|
+
**Parameters:**
|
|
198
|
+
|
|
199
|
+
| Name | Type | Description |
|
|
200
|
+
|------|------|-------------|
|
|
201
|
+
| `timemode` | `str` | Optional filter: 'weekly', 'monthly', or 'yearly' |
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### stats(totresponsetime, firstbytetime, lastbytetime)
|
|
206
|
+
|
|
207
|
+
Calculates minimum, maximum, and average of total response time, first byte time, and last byte time.
|
|
208
|
+
|
|
209
|
+
**Parameters:**
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description |
|
|
212
|
+
|------|------|-------------|
|
|
213
|
+
| `totresponsetime` | `list` | List of total response times |
|
|
214
|
+
| `firstbytetime` | `list` | List of first byte times |
|
|
215
|
+
| `lastbytetime` | `list` | List of last byte times |
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### desc()
|
|
221
|
+
|
|
222
|
+
Displays the load test statistics in the terminal.
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Options
|
|
227
|
+
|
|
228
|
+
| Flag | Description |
|
|
229
|
+
|------|-------------|
|
|
230
|
+
| `-n` | Number of requests |
|
|
231
|
+
| `-c` | Number of concurrent requests |
|
|
232
|
+
| `-GET` / `-POST` / `-DELETE` / `-PUT` / `-HEAD` / `-PATCH` | HTTP method |
|
|
233
|
+
| `-d` | JSON data for POST/PUT/PATCH/DELETE |
|
|
234
|
+
| `-history` | View session history |
|
|
235
|
+
| `-history -weekly` | View weekly session history |
|
|
236
|
+
| `-history -monthly` | View monthly session history |
|
|
237
|
+
| `-history -yearly` | View yearly session history |
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Changelog
|
|
242
|
+
|
|
243
|
+
### [1.0.0] - 2026-05-11
|
|
244
|
+
#### Added
|
|
245
|
+
- Initial release of AsyncLoad
|
|
246
|
+
- Asynchronous load testing CLI with concurrent request support
|
|
247
|
+
- Database storage for session history using SQLite
|
|
248
|
+
- Betterstack integration for monitoring and observability
|
|
249
|
+
- Support for multiple HTTP methods (GET, POST, PUT, DELETE, HEAD, PATCH)
|
|
250
|
+
- Configurable concurrency and request count
|
|
251
|
+
- Session history viewing (weekly, monthly, yearly)
|
|
252
|
+
- Load testing stats
|