Skip to content

Extended compare and run-remote tool #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Makefile for redisbench-admin

.PHONY: compliance compliance-fix test integration-tests help

# Code quality and compliance checks
compliance:
@echo "🔍 Running compliance checks..."
tox -e compliance

# Fix code formatting issues
format:
@echo "🔧 Fixing code formatting..."
tox -e format
@echo "✅ Code formatting fixed!"

# Alias for format
compliance-fix: format

# Run tests with coverage
test:
@echo "🧪 Running tests..."
poetry run coverage erase
poetry run pytest --cov=redisbench_admin --cov-report=term-missing -ra
poetry run coverage xml
@echo "✅ Tests completed!"

# Run integration tests (alias for test)
integration-tests: test

# Run both compliance and tests
all: compliance test

# Show help
help:
@echo "Available targets:"
@echo " compliance - Run code quality checks (black, flake8)"
@echo " format - Fix code formatting with black"
@echo " compliance-fix - Alias for format"
@echo " test - Run tests with coverage"
@echo " integration-tests - Alias for test"
@echo " all - Run compliance checks and tests"
@echo " help - Show this help message"

# Default target
.DEFAULT_GOAL := help
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ $ tox

To run a specific test:
```sh
$ tox -- tests/test_redistimeseries.py
$ tox -- tests/test_defaults_purpose_built_env.py
```

To run a specific test and persist the docker container used for timeseries:

```
tox --docker-dont-stop=rts_datasink -- -vv --log-cli-level=INFO tests/test_defaults_purpose_built_env.py
```

To run a specific test with verbose logging:
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "redisbench-admin"
version = "0.11.37"
version = "0.11.39"
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
authors = ["filipecosta90 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
readme = "README.md"
Expand Down Expand Up @@ -44,6 +44,9 @@ certifi = ">=2021.10.8,<2025.0.0"
pygithub = "^1.57"

[tool.poetry.dev-dependencies]
tox = ">=4.16.0"
tox-docker = ">=5.0.0"
docker = ">=7.1.0"
pytest = "^4.6"
pytest-cov = "^2.9.0"
codecov = "2.1.13"
Expand Down
2 changes: 1 addition & 1 deletion redisbench_admin/compare/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def create_compare_arguments(parser):
parser.add_argument(
"--regressions-percent-lower-limit",
type=float,
default=5.0,
default=8.0,
help="Only consider regressions with a percentage over the defined limit. (0-100)",
)
parser.add_argument(
Expand Down
Loading
Loading