Skip to content

Commit 8630614

Browse files
ann-benchmarks support (#296)
* Added ann-benchmark runner * Updated gitmodules
1 parent 0a3b564 commit 8630614

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+580
-360
lines changed

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ exclude =
1010
*.egg-info,
1111
.nox,
1212
.pytest_cache,
13-
.mypy_cache
13+
.mypy_cache,
14+
redisbench_admin/run/ann/pkg/

.github/workflows/publish-pypi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
poetry config virtualenvs.in-project false
3434
poetry config virtualenvs.path ~/.virtualenvs
3535
36+
- name: Set Submodules
37+
run: |
38+
git submodule update --init --recursive
39+
3640
- name: Install Dependencies
3741
run: poetry install
3842
if: steps.cache.outputs.cache-hit != 'true'

.github/workflows/tox.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
run: |
3535
pip3 install black coverage flake8 tox tox-docker tox-poetry
3636
37+
- name: Set Submodules
38+
run: |
39+
git submodule update --init --recursive
40+
3741
- name: Install Redis
3842
run: |
3943
sudo add-apt-repository ppa:redislabs/redis

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# redisbench-admin related inputs/outputs
22

3+
redisbench_admin/run/ann/pkg/
4+
5+
36
*.json
47
*.tar.gz
58
*.csv

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "redisbench_admin/run/ann/pkg"]
2+
path = redisbench_admin/run/ann/pkg
3+
url = https://github.com/RedisAI/ann-benchmarks

poetry.lock

Lines changed: 111 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.6.26"
3+
version = "0.6.27"
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"
@@ -14,12 +14,10 @@ python = "^3.6.1"
1414
humanize = "^2.4.0"
1515
requests = "^2.23.0"
1616
py_cpuinfo = "^5.0.0"
17-
redis = "^3.5.3"
17+
redis = "^4.1.4"
1818
boto3 = "^1.13.24"
1919
tqdm = "^4.46.1"
2020
toml = "^0.10.1"
21-
redistimeseries = "^1.4.3"
22-
redis-py-cluster = "^2.1.0"
2321
paramiko = "^2.7.2"
2422
jsonpath_ng = "^1.5.2"
2523
pysftp = "^0.2.9"

redisbench_admin/compare/compare.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import datetime as dt
1212

1313
from redisbench_admin.utils.remote import get_overall_dashboard_keynames
14-
from redistimeseries.client import Client
14+
1515

1616
from redisbench_admin.utils.utils import get_ts_metric_name
1717

@@ -29,13 +29,13 @@ def compare_command_logic(args, project_name, project_version):
2929
args.redistimeseries_port,
3030
)
3131
)
32-
rts = Client(
32+
rts = redis.Redis(
3333
host=args.redistimeseries_host,
3434
port=args.redistimeseries_port,
3535
password=args.redistimeseries_pass,
3636
username=args.redistimeseries_user,
3737
)
38-
rts.redis.ping()
38+
rts.ping()
3939

4040
tf_github_org = args.github_org
4141
tf_github_repo = args.github_repo
@@ -108,7 +108,7 @@ def compare_command_logic(args, project_name, project_version):
108108
) = get_overall_dashboard_keynames(tf_github_org, tf_github_repo, tf_triggering_env)
109109
test_names = []
110110
try:
111-
test_names = rts.redis.smembers(testcases_setname)
111+
test_names = rts.smembers(testcases_setname)
112112
test_names = list(test_names)
113113
test_names.sort()
114114
except redis.exceptions.ResponseError as e:

redisbench_admin/environments/oss_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def spin_up_local_redis_cluster(
4444
)
4545
)
4646
redis_process = subprocess.Popen(command)
47-
r = redis.StrictRedis(port=shard_port)
47+
r = redis.Redis(port=shard_port)
4848
result = wait_for_conn(r, dataset_load_timeout_secs)
4949
if result is True:
5050
logging.info("Redis available. pid={}".format(redis_process.pid))
@@ -164,7 +164,7 @@ def generate_cluster_redis_server_args(
164164
"--cluster-config-file",
165165
"cluster-node-port-{}.config".format(port),
166166
"--save",
167-
'""',
167+
"''",
168168
"--cluster-announce-ip",
169169
"{}".format(ip),
170170
"--port",

redisbench_admin/environments/oss_standalone.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def spin_up_local_redis(
3636
)
3737
)
3838
redis_process = subprocess.Popen(command)
39-
result = wait_for_conn(redis.StrictRedis(port=port), dataset_load_timeout_secs)
39+
result = wait_for_conn(redis.Redis(port=port), dataset_load_timeout_secs)
4040
if result is True:
4141
logging.info("Redis available")
4242
return [redis_process]
@@ -54,7 +54,7 @@ def generate_standalone_redis_server_args(
5454
command = [
5555
binary,
5656
"--save",
57-
'""',
57+
"",
5858
"--port",
5959
"{}".format(port),
6060
"--dir",

0 commit comments

Comments
 (0)