Redis基准运行助手。它围绕Redis和Redis模块基准工具(ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench等)进行包装。
项目描述
redisbench-admin
Redis基准运行助手可以帮助您完成以下任务
- 设置和拆解在redis-performance/testing-infrastructure上指定的基准测试基础设施
- 设置和拆解用于基准测试的Redis和Redis模块数据库
- 管理不同配置中的基准测试数据和规范
- 运行基准测试并记录结果
- 以多种格式(CSV、RedisTimeSeries、JSON)导出性能结果
- 通过附加分析工具/探针(perf(又名perf_events)、bpf工具、vtune)来查找CPU、非CPU、I/O和线程性能问题
- [即将推出] 通过附加遥测探针来查找性能问题
当前支持的基准测试工具
- redis-benchmark
- memtier_benchmark
- redis-benchmark-go
- YCSB
- tsbs
- redisgraph-benchmark-go
- ftsb_redisearch
- ann-benchmarks
安装
安装通过Python的包安装程序pip完成,如下所示
python3 -m pip install redisbench-admin
分析器守护进程
您可以使用以下方式单独使用分析器守护进程。在目标机器上执行以下操作
pip3 install --upgrade pip
pip3 install redisbench-admin --ignore-installed PyYAML
# install perf
apt install linux-tools-common linux-tools-generic linux-tools-`uname -r` -y
# ensure perf is working
perf --version
# install awscli
snap install aws-cli --classic
# configure aws
aws configure
# start the perf-daemon
perf-daemon start
WARNING:root:Unable to detected github_actor. caught the following error: No section: 'user'
Writting log to /tmp/perf-daemon.log
Starting perf-daemon. PID file /tmp/perfdaemon.pid. Daemon workdir: /root/RedisGraph
# check daemon is working appropriatelly
curl localhost:5000/ping
# start a profile
curl -X POST localhost:5000/profiler/perf/start/<pid to profile>
# stop a profile
curl -X POST -d '{"aws_access_key_id":$AWS_ACCESS_KEY_ID,"aws_secret_access_key":$AWS_SECRET_ACCESS_KEY}' localhost:5000/profiler/perf/stop/<pid to profile>
开发
- 安装pypoetry来管理您的依赖项并触发工具。
pip install poetry
- 从锁文件安装依赖项
poetry install
运行格式化程序
poetry run black .
运行linters
poetry run flake8
运行测试
提供了测试套件,可以使用以下命令运行
$ tox
运行特定测试
$ tox -- tests/test_redistimeseries.py
以详细日志记录运行特定测试
# tox -- -vv --log-cli-level=INFO tests/test_run.py
许可证
redisbench-admin 采用 BSD3 许可证发行 - 请参阅 LICENSE