Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opstree/redis-load-test
A utility to provide easy and fast performance testing for Redis.
https://github.com/opstree/redis-load-test
devops loadtesting opstreesolutions redis
Last synced: 2 months ago
JSON representation
A utility to provide easy and fast performance testing for Redis.
- Host: GitHub
- URL: https://github.com/opstree/redis-load-test
- Owner: opstree
- License: apache-2.0
- Created: 2019-04-27T13:27:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T04:56:53.000Z (about 1 year ago)
- Last Synced: 2024-08-01T12:19:01.991Z (5 months ago)
- Topics: devops, loadtesting, opstreesolutions, redis
- Language: Python
- Homepage: https://opstree.github.io
- Size: 151 KB
- Stars: 46
- Watchers: 5
- Forks: 35
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Redis Performance Testing - A OpsTree utility to test load on Redis
This main goal of creating this utility is to provide easy and fast performance testing for Redis.
## Dependencies
The list of dependencies are not quite long but yes we do have some dependencies.
#### System Dependencies
- [X] **python3**#### Python Dependencies
- [X] **locust**
- [X] **json**
- [X] **argparse**
- [X] **redis**Don't worry we have taken care the python dependencies in [requirments.txt](./Scripts/requirments.txt)
## Overview of Utility Structure
In this repository we have:-
- **Scripts**:- Scripts folder contains all the codebase which is required for performance testing.
- **[redis_set.py](./Scripts/redis_set.py)**:- This script is used to set random keys in Redis.
- **[redis_read.py](./Scripts/redis_read.py)**:- This script is used to perform *GET* action on Redis.
- **[redis_get_set.py](./Scripts/redis_get_set.py)**: This script is used to perform *SET* and *GET* operation simultaneously on Redis.
- **[redis.json](./Scripts/redis.json)**:- This is a json file in which we have to define our connection details of Redis. I created this file because I believe that code should not be changed.- **Results**:- This is a directory in which I am dumping some of my test results.
- **[redis_get_1000_users_stats.md](./Results/mardownResults/redis_get_1000_users_stats.md)**:- This is a test result of *GET* operation with 1000 users.
- **[redis_get_set_100_users_stats.md](./Results/mardownResults/redis_get_set_100_users_stats.md)**:- This is a test result of *GET* and *SET* operation simultaneously with 100 users.You may need to install python3 manually, for other things you can use **[requirments.txt](./Scripts/requirments.txt)**
```shell
cd Scripts
pip3 install -r requirments.txt
```## Usage
The use of this utility is not a fancy thing, just need to update the **[redis.json](./Scripts/redis.json)** with your redis connection details. Content of file should be like this:-
```json
{
"redis_host": "18.215.118.208",
"redis_port": "6379",
"redis_password": ""
}
```#### For SET Operation in Redis
```shell
./redis_set.py --filepath redis.json
```#### For GET Operation in Redis
```shell
locust -f redis_read.py
```#### For GET and SET simultaneously operation in Redis
```shell
locust -f redis_get_set.py
```