a tool to repeatedly run a command until failure
Project description
stressy
A tool to repeatedly run a shell command until failure.
- Easy to use: Just put
stressyin front of a command to repeat it until it returns a non-zero exit code. - Allows specifying a minimum number of runs or duration required to pass a stress test.
- Supports running a command concurrently using multiple processes.
- Keeps track of test results and statistics in a logfile.
Installation
For end users:
pip install stressy
For developers/contributors:
git clone https://github.com/dapaulid/stressy.git
pip install -e stressy/
This will checkout the source and install it from the local directory (a.k.a. Editable Install).
If you run into any trouble during installation, make sure that pip is available and up-to-date:
pip install --upgrade pip
Usage
usage: stressy [-h] [-n RUNS] [-d DURATION] [-p PROCESSES] [-t TIMEOUT] [-s SLEEP] [-c] [-q | -l] [-r] [--clear-results] ...
stressy v1.0.4 - a tool to repeatedly run a command until failure
https://github.com/dapaulid/stressy
positional arguments:
command the shell command to execute
options:
-h, --help show this help message and exit
-q, --quiet print subprocess output only if command fails
-l, --logfile write subprocess output to log files
execution:
-n RUNS, --runs RUNS number of repetitions, like 1000 or 10k
-d DURATION, --duration DURATION
repetition duration, like 30min or 12h
-p PROCESSES, --processes PROCESSES
number of processes to run the command in parallel
-t TIMEOUT, --timeout TIMEOUT
maximum duration for command to complete
-s SLEEP, --sleep SLEEP
duration in seconds to wait before next run
-c, --continue continue after first failure
result history:
-r, --results print result history for the given command
--clear-results clear result history for the given command
examples:
stressy echo hello # repeat until failure or ctrl-c
stressy -n 1k -q echo hello # repeat 1000 times, output failures only
stressy -d 12h -p 4 echo hello # repeat for 12 hours with 4 processes in parallel
stressy -n 3 -c bad_command # repeat after first failure
stressy -r # output previous results and statistics
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stressy-1.0.4.tar.gz.
File metadata
- Download URL: stressy-1.0.4.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b8a55e4689bbdf1b3744b972b118ad2e636809f053ba1e045ddc148e3e6943
|
|
| MD5 |
1279acd67af830bbea3f8b166101c774
|
|
| BLAKE2b-256 |
650c00227e92237c06e6ca193f336898021d203d867ca0c1d5917726e96c1964
|
File details
Details for the file stressy-1.0.4-py3-none-any.whl.
File metadata
- Download URL: stressy-1.0.4-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a93c12b2e05152c40adb6c50c7eb71505944a85f083857da2eb15dc15799611e
|
|
| MD5 |
ba5a8682ee16f11334774fe314eb2ee1
|
|
| BLAKE2b-256 |
3dc7d06380f3ad1bebc7a1efde7a2cf2c7ce8147a0032c9a3531559ecda4f4f0
|