From cd0d8eb543d44943353289dfc70d9432a26c0dbb Mon Sep 17 00:00:00 2001 From: florijan Date: Mon, 4 Sep 2017 16:06:18 +0200 Subject: [PATCH] Harness - dense expand group added, more tests on bench Summary: It turns out trivial if I use unwind for vertex creation, MATCH for edge creation and UNWIND for test duration. It took hours to converge to this :( Reviewers: mislav.bradac, buda Reviewed By: mislav.bradac Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D747 --- .../macro_benchmark/harness/groups/dense_expand/config.json | 3 +++ .../harness/groups/dense_expand/expand.run.cypher | 2 ++ .../groups/dense_expand/expand_into_existing.run.cypher | 4 ++++ .../macro_benchmark/harness/groups/dense_expand/setup.cypher | 2 ++ .../harness/groups/dense_expand/teardown.cypher | 1 + tests/macro_benchmark/harness/harness.py | 4 ++-- tools/apollo/generate | 5 +++-- 7 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 tests/macro_benchmark/harness/groups/dense_expand/config.json create mode 100644 tests/macro_benchmark/harness/groups/dense_expand/expand.run.cypher create mode 100644 tests/macro_benchmark/harness/groups/dense_expand/expand_into_existing.run.cypher create mode 100644 tests/macro_benchmark/harness/groups/dense_expand/setup.cypher create mode 100644 tests/macro_benchmark/harness/groups/dense_expand/teardown.cypher diff --git a/tests/macro_benchmark/harness/groups/dense_expand/config.json b/tests/macro_benchmark/harness/groups/dense_expand/config.json new file mode 100644 index 000000000..fb3b3f6fb --- /dev/null +++ b/tests/macro_benchmark/harness/groups/dense_expand/config.json @@ -0,0 +1,3 @@ +{ + "iterations": 10 +} diff --git a/tests/macro_benchmark/harness/groups/dense_expand/expand.run.cypher b/tests/macro_benchmark/harness/groups/dense_expand/expand.run.cypher new file mode 100644 index 000000000..677e5f58c --- /dev/null +++ b/tests/macro_benchmark/harness/groups/dense_expand/expand.run.cypher @@ -0,0 +1,2 @@ +MATCH (a)-->(c) +RETURN 1 SKIP 1000000; diff --git a/tests/macro_benchmark/harness/groups/dense_expand/expand_into_existing.run.cypher b/tests/macro_benchmark/harness/groups/dense_expand/expand_into_existing.run.cypher new file mode 100644 index 000000000..3b96bf121 --- /dev/null +++ b/tests/macro_benchmark/harness/groups/dense_expand/expand_into_existing.run.cypher @@ -0,0 +1,4 @@ +MATCH (a) WITH a LIMIT 10 +MATCH (b) WITH a, b +MATCH (a)-[r]->(b) +RETURN 1 SKIP 1000000; diff --git a/tests/macro_benchmark/harness/groups/dense_expand/setup.cypher b/tests/macro_benchmark/harness/groups/dense_expand/setup.cypher new file mode 100644 index 000000000..2327bc10d --- /dev/null +++ b/tests/macro_benchmark/harness/groups/dense_expand/setup.cypher @@ -0,0 +1,2 @@ +UNWIND range(0, 499) AS i CREATE (); +MATCH (a), (b) CREATE (a)-[:Type]->(b); diff --git a/tests/macro_benchmark/harness/groups/dense_expand/teardown.cypher b/tests/macro_benchmark/harness/groups/dense_expand/teardown.cypher new file mode 100644 index 000000000..37d4c9dd4 --- /dev/null +++ b/tests/macro_benchmark/harness/groups/dense_expand/teardown.cypher @@ -0,0 +1 @@ +MATCH (n) DETACH DELETE n diff --git a/tests/macro_benchmark/harness/harness.py b/tests/macro_benchmark/harness/harness.py index 8462fbc7a..1493399bf 100755 --- a/tests/macro_benchmark/harness/harness.py +++ b/tests/macro_benchmark/harness/harness.py @@ -311,8 +311,8 @@ class QuerySuite(_QuerySuite): return ["MemgraphRunner", "NeoRunner"] def groups(self): - return ["1000_create", "unwind_create", "match", "expression", - "aggregation", "return", "update", "delete"] + return ["1000_create", "unwind_create", "match", "dense_expand", + "expression", "aggregation", "return", "update", "delete"] class QueryParallelSuite(_QuerySuite): diff --git a/tools/apollo/generate b/tools/apollo/generate index 286f11290..bc34b503b 100755 --- a/tools/apollo/generate +++ b/tools/apollo/generate @@ -191,8 +191,9 @@ binary_release_link_path = os.path.join(BUILD_RELEASE_DIR, "memgraph") # macro benchmark tests MACRO_BENCHMARK_ARGS = ( - "QuerySuite MemgraphRunner " + - "--groups aggregation 1000_create unwind_create --no-strict") + "QuerySuite MemgraphRunner " + "--groups aggregation 1000_create unwind_create dense_expand " + "--no-strict") macro_bench_path = os.path.join(BASE_DIR, "tests", "macro_benchmark") harness_client_binary = os.path.join(BUILD_RELEASE_DIR, "tests", "macro_benchmark", "harness_client")