Add multithreaded create benchmark
Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D585
This commit is contained in:
parent
29a7b12e22
commit
10b0f7cdf4
4
tests/benchmark_infra/groups/create_parallel/config.json
Normal file
4
tests/benchmark_infra/groups/create_parallel/config.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"iterations": 3,
|
||||
"num_client_workers": 16
|
||||
}
|
@ -0,0 +1 @@
|
||||
MATCH (n) DETACH DELETE n
|
@ -0,0 +1 @@
|
||||
print("CREATE (:A {x : 10});" * 1000000)
|
@ -35,7 +35,7 @@ from contextlib import redirect_stderr
|
||||
import io
|
||||
from multiprocessing import Pool
|
||||
from common import connection_argument_parser, execute_till_success, \
|
||||
argument_session
|
||||
argument_driver
|
||||
from functools import partial
|
||||
|
||||
from neo4j.v1 import GraphDatabase, basic_auth
|
||||
@ -59,10 +59,12 @@ def _print_dict(d):
|
||||
print(json.dumps(_prepare_for_json(d), indent=2))
|
||||
|
||||
|
||||
def _run_query(args, query):
|
||||
with argument_session(args) as session:
|
||||
return execute_till_success(session, query)[2]
|
||||
|
||||
def _run_query(args, query, self):
|
||||
if not hasattr(self, "driver"):
|
||||
self.driver = argument_driver(args)
|
||||
self.session = self.driver.session()
|
||||
return execute_till_success(self.session, query)[2]
|
||||
_run_query.__defaults__ = (_run_query,)
|
||||
|
||||
def main():
|
||||
argp = connection_argument_parser()
|
||||
|
@ -288,7 +288,7 @@ class QueryParallelSuite(_QuerySuite):
|
||||
return ["MemgraphRunner"]
|
||||
|
||||
def groups(self):
|
||||
return ["aggregation_parallel"]
|
||||
return ["aggregation_parallel", "create_parallel"]
|
||||
|
||||
|
||||
class MemgraphRunner:
|
||||
@ -348,7 +348,7 @@ class MemgraphRunner:
|
||||
|
||||
# TODO make the timeout configurable per query or something
|
||||
return_code = self.bolt_client.run_and_wait(
|
||||
"python3", client_args, timeout=120, stdin=queries_path)
|
||||
"python3", client_args, timeout=300, stdin=queries_path)
|
||||
os.remove(queries_path)
|
||||
if return_code != 0:
|
||||
with open(self.bolt_client.get_stderr()) as f:
|
||||
|
Loading…
Reference in New Issue
Block a user