Skip to content

Commit 05ed56e

Browse files
Extended compare and run-remote tool (#452)
* compare improvements * added grafana uid * feat: enhance run-remote robustness and reliability • Fixed massive variance blocking regression detection - Added proper variance-based validation that prevents false positives when latency data is too unstable for reliable analysis • Fixed missing test links in performance summaries - Corrected regression counting logic so clickable Grafana links appear in bullet lists for confirmed regressions • Added conditional AWS credentials checking - Credentials are only required when actually needed (for infrastructure deployment or S3 upload, not when using existing infrastructure with --inventory) • Added automatic tool installation - Missing dependencies like redis-server, zip, and memtier_benchmark are automatically installed on remote nodes using official Redis APT repository • Enhanced S3 upload error handling - Upload failures don't crash the process but continue with warnings, ensuring benchmark results are preserved locally even when S3 is unavailable These changes make run-remote much more robust, user-friendly, and reliable by eliminating false regression alerts, providing better diagnostic information, reducing setup requirements, and gracefully handling common failure scenarios. * Fixed black/flake8 issues * Added test for specific oss cluster setup name * fixes per PR failures * Fixed mock server key error * Extended run-local tests with dry run validation. Ensured setup names are store in timeseries. fixed tox-docker deps * Fixed rts usage on tests * Fixed common tests * fixed import os error * fixed run_remote --------- Co-authored-by: fcostaoliveira <[email protected]>
1 parent 298ee82 commit 05ed56e

31 files changed

+2870
-160
lines changed

Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Makefile for redisbench-admin
2+
3+
.PHONY: compliance compliance-fix test integration-tests help
4+
5+
# Code quality and compliance checks
6+
compliance:
7+
@echo "🔍 Running compliance checks..."
8+
tox -e compliance
9+
10+
# Fix code formatting issues
11+
format:
12+
@echo "🔧 Fixing code formatting..."
13+
tox -e format
14+
@echo "✅ Code formatting fixed!"
15+
16+
# Alias for format
17+
compliance-fix: format
18+
19+
# Run tests with coverage
20+
test:
21+
@echo "🧪 Running tests..."
22+
poetry run coverage erase
23+
poetry run pytest --cov=redisbench_admin --cov-report=term-missing -ra
24+
poetry run coverage xml
25+
@echo "✅ Tests completed!"
26+
27+
# Run integration tests (alias for test)
28+
integration-tests: test
29+
30+
# Run both compliance and tests
31+
all: compliance test
32+
33+
# Show help
34+
help:
35+
@echo "Available targets:"
36+
@echo " compliance - Run code quality checks (black, flake8)"
37+
@echo " format - Fix code formatting with black"
38+
@echo " compliance-fix - Alias for format"
39+
@echo " test - Run tests with coverage"
40+
@echo " integration-tests - Alias for test"
41+
@echo " all - Run compliance checks and tests"
42+
@echo " help - Show this help message"
43+
44+
# Default target
45+
.DEFAULT_GOAL := help

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ $ tox
110110

111111
To run a specific test:
112112
```sh
113-
$ tox -- tests/test_redistimeseries.py
113+
$ tox -- tests/test_defaults_purpose_built_env.py
114+
```
115+
116+
To run a specific test and persist the docker container used for timeseries:
117+
118+
```
119+
tox --docker-dont-stop=rts_datasink -- -vv --log-cli-level=INFO tests/test_defaults_purpose_built_env.py
114120
```
115121

116122
To run a specific test with verbose logging:

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.11.37"
3+
version = "0.11.40"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "README.md"
@@ -44,6 +44,9 @@ certifi = ">=2021.10.8,<2025.0.0"
4444
pygithub = "^1.57"
4545

4646
[tool.poetry.dev-dependencies]
47+
tox = ">=4.16.0"
48+
tox-docker = ">=5.0.0"
49+
docker = ">=7.1.0"
4750
pytest = "^4.6"
4851
pytest-cov = "^2.9.0"
4952
codecov = "2.1.13"

redisbench_admin/compare/args.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def create_compare_arguments(parser):
135135
parser.add_argument(
136136
"--regressions-percent-lower-limit",
137137
type=float,
138-
default=5.0,
138+
default=8.0,
139139
help="Only consider regressions with a percentage over the defined limit. (0-100)",
140140
)
141141
parser.add_argument(
@@ -162,6 +162,10 @@ def create_compare_arguments(parser):
162162
type=str,
163163
default="https://benchmarksrediscom.grafana.net/d/",
164164
)
165+
parser.add_argument(
166+
"--grafana_uid",
167+
default=None,
168+
)
165169
parser.add_argument(
166170
"--auto-approve",
167171
required=False,

0 commit comments

Comments
 (0)