Remove leftover config files
Summary: Don't use flag files for specifying flag values in tests. Instead, all necessary flags are explicitly defined in each of the tests. Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2588
This commit is contained in:
parent
d9abb7ccf1
commit
dd68065d34
@ -1,19 +0,0 @@
|
||||
# MEMGRAPH DEFAULT BENCHMARKING CONFIG
|
||||
|
||||
# NOTE: all paths are relative to the run folder
|
||||
# (where the executable is run)
|
||||
|
||||
# no properties on edges
|
||||
--storage-properties-on-edges=false
|
||||
|
||||
# no durability
|
||||
--storage-snapshot-on-exit=false
|
||||
--storage-snapshot-interval-sec=0
|
||||
--storage-wal-enabled=false
|
||||
--storage-recover-on-startup=false
|
||||
|
||||
# no query execution time limit
|
||||
--query-execution-timeout-sec=0
|
||||
|
||||
# number of workers
|
||||
--num-workers=1
|
@ -1,9 +0,0 @@
|
||||
# MEMGRAPH DEFAULT TESTING CONFIG
|
||||
|
||||
# NOTE: all paths are relative to the run folder
|
||||
# (where the executable is run)
|
||||
|
||||
# no durability
|
||||
--durability-enabled=false
|
||||
--snapshot-on-exit=false
|
||||
--db-recover-on-startup=false
|
@ -25,7 +25,7 @@ class Memgraph:
|
||||
"""
|
||||
Knows how to start and stop memgraph.
|
||||
"""
|
||||
def __init__(self, args, config, num_workers):
|
||||
def __init__(self, args, num_workers):
|
||||
self.log = logging.getLogger("MemgraphRunner")
|
||||
argp = ArgumentParser("MemgraphArgumentParser")
|
||||
argp.add_argument("--runner-bin",
|
||||
@ -37,7 +37,6 @@ class Memgraph:
|
||||
argp.add_argument("--storage-recover-on-startup", action="store_true")
|
||||
self.log.info("Initializing Runner with arguments %r", args)
|
||||
self.args, _ = argp.parse_known_args(args)
|
||||
self.config = config
|
||||
self.num_workers = num_workers
|
||||
self.database_bin = jail.get_process()
|
||||
self.name = "memgraph"
|
||||
@ -45,8 +44,8 @@ class Memgraph:
|
||||
|
||||
def start(self):
|
||||
self.log.info("start")
|
||||
env = {"MEMGRAPH_CONFIG": self.config}
|
||||
database_args = ["--port", self.args.port]
|
||||
database_args = ["--port", self.args.port,
|
||||
"--query-execution-timeout-sec", "0"]
|
||||
if self.num_workers:
|
||||
database_args += ["--num_workers", str(self.num_workers)]
|
||||
if self.args.data_directory:
|
||||
@ -65,7 +64,7 @@ class Memgraph:
|
||||
runner_bin = get_absolute_path("memgraph", "build_release")
|
||||
|
||||
# start memgraph
|
||||
self.database_bin.run(runner_bin, database_args, env=env, timeout=600)
|
||||
self.database_bin.run(runner_bin, database_args, timeout=600)
|
||||
wait_for_server(self.args.port)
|
||||
|
||||
def stop(self):
|
||||
|
@ -90,9 +90,6 @@ class MemgraphRunner(_LongRunningRunner):
|
||||
"""
|
||||
def __init__(self, args):
|
||||
argp = ArgumentParser("MemgraphRunnerArgumentParser")
|
||||
argp.add_argument("--runner-config", default=get_absolute_path(
|
||||
"benchmarking.conf", "config"),
|
||||
help="Path to memgraph config")
|
||||
argp.add_argument("--num-database-workers", type=int, default=8,
|
||||
help="Number of workers")
|
||||
argp.add_argument("--num-client-workers", type=int, default=24,
|
||||
@ -105,8 +102,7 @@ class MemgraphRunner(_LongRunningRunner):
|
||||
"--num-database-workers is obligatory flag on apollo"
|
||||
assert not APOLLO or self.args.num_client_workers, \
|
||||
"--num-client-workers is obligatory flag on apollo"
|
||||
database = Memgraph(remaining_args, self.args.runner_config,
|
||||
self.args.num_database_workers)
|
||||
database = Memgraph(remaining_args, self.args.num_database_workers)
|
||||
super(MemgraphRunner, self).__init__(
|
||||
remaining_args, database, self.args.num_client_workers,
|
||||
self.args.workload)
|
||||
|
@ -211,13 +211,8 @@ class MemgraphRunner(_QueryRunner):
|
||||
Configures memgraph database for QuerySuite execution.
|
||||
"""
|
||||
def __init__(self, args):
|
||||
argp = ArgumentParser("MemgraphRunnerArgumentParser")
|
||||
argp.add_argument("--runner-config", default=get_absolute_path(
|
||||
"benchmarking.conf", "config"),
|
||||
help="Path to memgraph config")
|
||||
self.args, remaining_args = argp.parse_known_args(args)
|
||||
database = Memgraph(remaining_args, self.args.runner_config, 1)
|
||||
super(MemgraphRunner, self).__init__(remaining_args, database, 1)
|
||||
database = Memgraph(args, 1)
|
||||
super(MemgraphRunner, self).__init__(args, database, 1)
|
||||
|
||||
|
||||
class NeoRunner(_QueryRunner):
|
||||
@ -259,9 +254,6 @@ class MemgraphParallelRunner(_QueryRunner):
|
||||
"""
|
||||
def __init__(self, args):
|
||||
argp = ArgumentParser("MemgraphRunnerArgumentParser")
|
||||
argp.add_argument("--runner-config", default=get_absolute_path(
|
||||
"benchmarking.conf", "config"),
|
||||
help="Path to memgraph config")
|
||||
argp.add_argument("--num-database-workers", type=int, default=8,
|
||||
help="Number of workers")
|
||||
argp.add_argument("--num-client-workers", type=int, default=24,
|
||||
@ -271,7 +263,6 @@ class MemgraphParallelRunner(_QueryRunner):
|
||||
"--num-database-workers is obligatory flag on apollo"
|
||||
assert not APOLLO or self.args.num_client_workers, \
|
||||
"--num-client-workers is obligatory flag on apollo"
|
||||
database = Memgraph(remaining_args, self.args.runner_config,
|
||||
self.args.num_database_workers)
|
||||
database = Memgraph(remaining_args, self.args.num_database_workers)
|
||||
super(MemgraphParallelRunner, self).__init__(
|
||||
remaining_args, database, self.args.num_client_workers)
|
||||
|
@ -10,7 +10,6 @@ sys.path.append(os.path.dirname(os.path.realpath(__file__)) +
|
||||
"/../tests/macro_benchmark/")
|
||||
from databases import *
|
||||
from clients import *
|
||||
from common import get_absolute_path
|
||||
|
||||
def avg_no_label_node_size(memgraph, client, measure_points):
|
||||
node_size_sum = 0
|
||||
@ -70,9 +69,7 @@ def avg_edge_size(memgraph, client, measure_points):
|
||||
return edge_size_sum / len(measure_points)
|
||||
|
||||
def main():
|
||||
path = get_absolute_path("benchmarking.conf", "config")
|
||||
|
||||
memgraph = Memgraph(None, path, 1)
|
||||
memgraph = Memgraph(None, 1)
|
||||
client = QueryClient(None, 1)
|
||||
|
||||
measure_points = [10**6, 2*10**6, 5*10**6, 10*10**6]
|
||||
|
@ -12,17 +12,16 @@ sys.path.append(os.path.dirname(os.path.realpath(__file__)) +
|
||||
"/../tests/macro_benchmark/")
|
||||
from databases import *
|
||||
from clients import *
|
||||
from common import get_absolute_path
|
||||
|
||||
def main():
|
||||
path = get_absolute_path("benchmarking.conf", "config")
|
||||
durability_dir = tempfile.TemporaryDirectory()
|
||||
|
||||
DURABILITY_DIR_ARG = ["--durability-directory", durability_dir.name]
|
||||
MAKE_SNAPSHOT_ARGS = ["--snapshot-on-exit"] + DURABILITY_DIR_ARG
|
||||
RECOVER_SNAPSHOT_ARGS = ["--db-recover-on-startup"] + DURABILITY_DIR_ARG
|
||||
snapshot_memgraph = Memgraph(MAKE_SNAPSHOT_ARGS, path, 1)
|
||||
recover_memgraph = Memgraph(RECOVER_SNAPSHOT_ARGS, path, 1)
|
||||
DURABILITY_DIR_ARG = ["--data-directory", durability_dir.name]
|
||||
MAKE_SNAPSHOT_ARGS = ["--storage-snapshot-on-exit"] + DURABILITY_DIR_ARG
|
||||
RECOVER_SNAPSHOT_ARGS = ["--storage-recover-on-startup"] + \
|
||||
DURABILITY_DIR_ARG
|
||||
snapshot_memgraph = Memgraph(MAKE_SNAPSHOT_ARGS, 1)
|
||||
recover_memgraph = Memgraph(RECOVER_SNAPSHOT_ARGS, 1)
|
||||
client = QueryClient(None, 1)
|
||||
|
||||
results = []
|
||||
|
Loading…
Reference in New Issue
Block a user