Skip to content
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
3 changes: 1 addition & 2 deletions redisbench_admin/run/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@ def prepare_benchmark_parameters(benchmark_config, benchmark_tool, server_plaint
if 'redisgraph-benchmark-go' in benchmark_tool:
if isremote is True:
benchmark_tool = "/tmp/redisgraph-benchmark-go"
command_arr = prepareRedisGraphBenchmarkGoCommand(
command_arr, command_str = prepareRedisGraphBenchmarkGoCommand(
benchmark_tool,
server_private_ip,
server_plaintext_port,
entry,
remote_results_file,
isremote
)
command_str = " ".join(command_arr)

if 'ycsb' in benchmark_tool:
command_arr, command_str = prepareYCSBBenchmarkCommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ def prepareRedisGraphBenchmarkGoCommand(
" ".join(queries_str)
)
)
return queries_str
command_str = " ".join(queries_str)
return queries_str, command_str
20 changes: 20 additions & 0 deletions tests/test_data/redisgraph-benchmark-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "UPDATE-BASELINE"
remote:
- setup: redisgraph-r5
- type: oss-standalone
dbconfig:
- dataset: "datasets/single_node.rdb"
clientconfig:
- tool: redisgraph-benchmark-go
- parameters:
- graph: "g"
- rps: 0
- clients: 32
- threads: 4
- connections: 32
- requests: 1000000
- queries:
- { q: "MATCH (n) WHERE ID(n) = 0 SET n.v = n.v + 1", ratio: 1 }
kpis:
- le: { $.OverallClientLatencies.Total.q50: 2.0 }
- ge: { $.OverallQueryRates.Total: 18000 }
12 changes: 12 additions & 0 deletions tests/test_redisgraph_benchmark_go.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import yaml

from redisbench_admin.run.redisgraph_benchmark_go.redisgraph_benchmark_go import prepareRedisGraphBenchmarkGoCommand


def test_prepare_redis_graph_benchmark_go_command():
with open("./tests/test_data/redisgraph-benchmark-go.yml", "r") as yml_file:
benchmark_config = yaml.safe_load(yml_file)
for k in benchmark_config["clientconfig"]:
if 'parameters' in k:
command_arr, command_str = prepareRedisGraphBenchmarkGoCommand("redisgraph-benchmark-go", "localhost", "6380", k, "result.txt")
assert command_str == "redisgraph-benchmark-go -graph-key g -rps 0 -c 32 -n 1000000 -query MATCH (n) WHERE ID(n) = 0 SET n.v = n.v + 1 -query-ratio 1 -h localhost -p 6380 -json-out-file result.txt"
7 changes: 6 additions & 1 deletion tests/test_remote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from redisbench_admin.utils.remote import extract_git_vars
from redisbench_admin.utils.remote import extract_git_vars, fetchRemoteSetupFromConfig


def test_extract_git_vars():
Expand Down Expand Up @@ -46,3 +46,8 @@ def test_extract_git_vars_passing_repo3():
if github_branch_detached is False:
assert github_actor != None and github_branch != ""
assert github_branch != None and github_branch != ""


def test_fetch_remote_setup_from_config():
terraform_working_dir, type = fetchRemoteSetupFromConfig([{"type":"oss-standalone"},{"setup":"redistimeseries-m5d"}])
assert type == "oss-standalone"