Skip to content
Snippets Groups Projects
Commit d0bffb4f authored by julian's avatar julian
Browse files

added name to experiment to be able to tell apart the results.

parent e3836285
Branches
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ if __name__ == "__main__":
basicConfig(level=INFO, format="%(asctime)s - %(levelname)s - %(message)s")
log_dir = "log"
csv_path = f"{log_dir}/{strftime("%Y-%m-%d_%H-%M-%S")}_perf_data.csv"
csv_path = f"{log_dir}/data.csv"
if not path.exists(log_dir):
makedirs(log_dir)
......@@ -55,7 +55,7 @@ if __name__ == "__main__":
csv.writer(file).writerow(("TIMESTAMP", "VERTEX_COUNT"))
info("Starting...")
end_time = timedelta(hours=1)
end_time = timedelta(seconds=15)
schedule.every(5).seconds.until(end_time).do(perf_job, csv_path)
while (sleep_time := schedule.idle_seconds()) is not None and not interrupted:
sleep(max(sleep_time, 0))
......
......@@ -3,7 +3,7 @@ from subprocess import run
from typing import Sequence
def run_experiment(compose_files: Sequence[str], env: dict = {}):
def run_experiment(name: str, compose_files: Sequence[str], env: dict = {}):
environ["COMPOSE_PROFILES"] = "experiment"
for key, val in env.items():
environ[key] = str(val)
......@@ -18,7 +18,7 @@ def run_experiment(compose_files: Sequence[str], env: dict = {}):
run(("docker", "compose", "wait", "query_pg"))
print("data run finished, saving result")
run(("docker", "compose", "cp", "query_pg:/app/log/.", "result/"))
run(("docker", "compose", "cp", "query_pg:/app/log/data.csv", f"result/{name}.csv"))
run(("docker", "compose", "down"))
......@@ -28,78 +28,97 @@ if __name__ == "__main__":
makedirs(result_dir)
experiments: Sequence[dict] = (
{
"name": "experiment_uuid_10000",
"compose_files": ("compose.yml", "edge-uuid.yml", "index.yml"),
"env": {"UUID_EDGES": "UUID_EDGES"},
},
{
"name": "experiment_uuid_20000",
"compose_files": ("compose.yml", "edge-uuid.yml", "index.yml"),
"env": {"UUID_EDGES": "UUID_EDGES", "LINES_PER_SECOND": 20000},
},
{
"name": "experiment_batch1_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 1},
},
{
"name": "experiment_batch1_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 1, "LINES_PER_SECOND": 20000},
},
{
"name": "experiment_batch10_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 10},
},
{
"name": "experiment_batch10_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 10, "LINES_PER_SECOND": 20000},
},
{
"name": "experiment_batch100_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 100},
},
{
"name": "experiment_batch100_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 100, "LINES_PER_SECOND": 20000},
},
{
"name": "experiment_batch1000_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 1000},
},
{
"name": "experiment_batch1000_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"BATCH_SIZE": 1000, "LINES_PER_SECOND": 20000},
},
{
"name": "experiment_no_uuid_index",
"compose_files": ("compose.yml", "edge-id-no-index.yml", "index.yml"),
"env": {"LINES_PER_SECOND": 1500},
},
{
"name": "experiment_default_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {},
},
{
"name": "experiment_default_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index.yml"),
"env": {"LINES_PER_SECOND": 20000},
},
{
"name": "experiment_hash_index_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index-hash.yml"),
"env": {},
},
{
"name": "experiment_hash_index_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index-hash.yml"),
"env": {"LINES_PER_SECOND": 20000},
},
{
"name": "experiment_multicolumn_index_10000",
"compose_files": ("compose.yml", "edge-id.yml", "index-multi.yml"),
"env": {},
},
{
"name": "experiment_multicolumn_index_20000",
"compose_files": ("compose.yml", "edge-id.yml", "index-multi.yml"),
"env": {"LINES_PER_SECOND": 20000},
},
{
"name": "experiment_triggers_10000",
"compose_files": ("compose.yml", "edge-id-triggers.yml", "index.yml"),
"env": {"EDGE_INSERTS": ""},
},
{
"name": "experiment_triggers_20000",
"compose_files": ("compose.yml", "edge-id-triggers.yml", "index.yml"),
"env": {"EDGE_INSERTS": "", "LINES_PER_SECOND": 20000},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment