Skip to content

Fixed runner tests according to test cases #170

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

Merged
merged 1 commit into from
Dec 6, 2022
Merged
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 0.4
name: memtier_benchmark-2keys-stream-5-entries-xread-all-entries
description: 'Runs memtier_benchmark, for a keyspace length of 2 STREAM keys with 5 entries on each stream. We query both streams on the same command using XREAD with range of all entries. '
dbconfig:
- configuration-parameters:
- save: '""'
- init_commands:
- xadd key-1 * field value
- xadd key-1 * field value
- xadd key-1 * field value
- xadd key-1 * field value
- xadd key-1 * field value
- xadd key-2 * field value
- xadd key-2 * field value
- xadd key-2 * field value
- xadd key-2 * field value
- xadd key-2 * field value
tested-commands:
- xread
redis-topologies:
- oss-standalone
build-variants:
- gcc:8.5.0-amd64-debian-buster-default
clientconfig:
run_image: redislabs/memtier_benchmark:edge
tool: memtier_benchmark
arguments: --command="XREAD STREAMS key-1 key-2 0 0" --hide-histogram --test-time 5
resources:
requests:
cpus: '4'
memory: 2g
exporter:
redistimeseries:
break_by:
- version
- commit
timemetric: $."ALL STATS".Runtime."Start time"
metrics:
- $."ALL STATS".Totals."Ops/sec"
- $."ALL STATS".Totals."Latency"
- $."ALL STATS".Totals."Misses/sec"
- $."ALL STATS".Totals."Percentile Latencies"."p50.00"
tested-groups:
- stream
13 changes: 8 additions & 5 deletions utils/tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_run_client_runner_logic():
args = parser.parse_args(
args=[
"--test",
"../../utils/tests/test_data/test-suites/memtier_benchmark-10keys-100B-expire-use-case-with-variant.yml",
"../../utils/tests/test_data/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml",
"--db_server_host",
"{}".format(db_host),
"--db_server_port",
Expand All @@ -182,13 +182,13 @@ def test_run_client_runner_logic():

r = redis.Redis(host=db_host, port=db_port_int)
total_keys = r.info("keyspace")["db0"]["keys"]
assert total_keys == 10
assert total_keys == 2

# run while pushing to redistimeseries
args = parser.parse_args(
args=[
"--test",
"../../utils/tests/test_data/test-suites/memtier_benchmark-10keys-100B-expire-use-case-with-variant.yml",
"../../utils/tests/test_data/test-suites/memtier_benchmark-2keys-stream-5-entries-xread-all-entries.yml",
"--datasink_push_results_redistimeseries",
"--datasink_redistimeseries_host",
"{}".format(db_host),
Expand All @@ -208,7 +208,10 @@ def test_run_client_runner_logic():

r = redis.Redis(host=db_host, port=db_port_int)
total_keys = r.info("keyspace")["db0"]["keys"]
assert total_keys == 10
assert total_keys == 2
rts = redis.Redis(host=db_host, port=db_port_int)
total_keys = rts.info("keyspace")["db0"]["keys"]
assert total_keys > 0


def test_extract_testsuites():
Expand Down Expand Up @@ -250,4 +253,4 @@ def test_extract_testsuites():
]
)
tests = extract_testsuites(args)
assert len(tests) == 3
assert len(tests) == 2