Skip to content

Commit 5b309fa

Browse files
committed
Add benchmark results and update scripts for OLAP and vector operations
- Introduced new benchmark result files for graph OLAP, vector index build, and vector search across all dataset sizes. - Updated scripts for running OLTP and OLAP matrix tests to reflect changes in database identifiers, specifically replacing "arcadedb" with "arcadedb_sql". - Enhanced version management in summary scripts to accommodate new database identifiers. - Adjusted dataset configurations and transaction parameters for improved testing accuracy and performance.
1 parent 6cdb3ac commit 5b309fa

22 files changed

Lines changed: 642 additions & 104 deletions

bindings/python/examples/07_stackoverflow_tables_oltp.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ def run_in_docker(args):
20392039
filtered_args.append(arg)
20402040

20412041
arcadedb_wheel_mount_path = None
2042-
if args.db == "arcadedb":
2042+
if args.db == "arcadedb_sql":
20432043
wheel_candidates = sorted(
20442044
(repo_root / "bindings/python/dist").glob("*embed*.whl")
20452045
)
@@ -2147,9 +2147,9 @@ def main():
21472147
)
21482148
parser.add_argument(
21492149
"--db",
2150-
choices=["arcadedb", "sqlite", "duckdb", "postgresql"],
2151-
default="arcadedb",
2152-
help="Database to test (default: arcadedb)",
2150+
choices=["arcadedb_sql", "sqlite", "duckdb", "postgresql"],
2151+
default="arcadedb_sql",
2152+
help="Database to test (default: arcadedb_sql)",
21532153
)
21542154
parser.add_argument(
21552155
"--threads", type=int, default=4, help="Number of worker threads (default: 4)"
@@ -2208,7 +2208,7 @@ def main():
22082208

22092209
heap_size = (
22102210
resolve_arcadedb_heap_size(args.mem_limit, args.jvm_heap_fraction)
2211-
if args.db == "arcadedb"
2211+
if args.db == "arcadedb_sql"
22122212
else None
22132213
)
22142214
args.heap_size_effective = heap_size
@@ -2234,12 +2234,12 @@ def main():
22342234
print(f"SQLite profile: {args.sqlite_profile}")
22352235
print(f"Threads: {args.threads}")
22362236
print(f"Transactions: {args.transactions:,}")
2237-
if args.db == "arcadedb":
2237+
if args.db == "arcadedb_sql":
22382238
print(f"JVM heap size: {heap_size}")
22392239
print(f"DB path: {db_path}")
22402240
print()
22412241

2242-
if args.db == "arcadedb":
2242+
if args.db == "arcadedb_sql":
22432243
summary = run_oltp_arcadedb(
22442244
db_path=db_path,
22452245
data_dir=data_dir,

bindings/python/examples/08_stackoverflow_tables_olap.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ def run_in_docker(args):
13491349
filtered_args.append(arg)
13501350

13511351
arcadedb_wheel_mount_path = None
1352-
if args.db == "arcadedb":
1352+
if args.db == "arcadedb_sql":
13531353
wheel_candidates = sorted(
13541354
(repo_root / "bindings/python/dist").glob("*embed*.whl")
13551355
)
@@ -1995,9 +1995,9 @@ def main():
19951995
)
19961996
parser.add_argument(
19971997
"--db",
1998-
choices=["arcadedb", "sqlite", "duckdb", "postgresql"],
1999-
default="arcadedb",
2000-
help="Database to test (default: arcadedb)",
1998+
choices=["arcadedb_sql", "sqlite", "duckdb", "postgresql"],
1999+
default="arcadedb_sql",
2000+
help="Database to test (default: arcadedb_sql)",
20012001
)
20022002
parser.add_argument(
20032003
"--batch-size",
@@ -2084,12 +2084,12 @@ def main():
20842084
args.mem_limit,
20852085
args.jvm_heap_fraction,
20862086
)
2087-
if args.db == "arcadedb"
2087+
if args.db == "arcadedb_sql"
20882088
else args.mem_limit
20892089
)
20902090
args.heap_size_effective = heap_size
20912091
jvm_kwargs = {"heap_size": heap_size}
2092-
if args.db == "arcadedb":
2092+
if args.db == "arcadedb_sql":
20932093
jvm_kwargs["jvm_args"] = (
20942094
"-Darcadedb.queryMaxHeapElementsAllowedPerOp="
20952095
f"{args.arcadedb_query_max_heap_elements}"
@@ -2112,7 +2112,7 @@ def main():
21122112
print(f"Query runs: {args.query_runs}")
21132113
print(f"Query order: {args.query_order}")
21142114
print(f"Seed: {args.seed}")
2115-
if args.db == "arcadedb":
2115+
if args.db == "arcadedb_sql":
21162116
print(f"JVM heap size: {heap_size}")
21172117
print(
21182118
"ArcadeDB query max heap elements/op: "
@@ -2123,7 +2123,7 @@ def main():
21232123

21242124
start_time = time.perf_counter()
21252125

2126-
if args.db == "arcadedb":
2126+
if args.db == "arcadedb_sql":
21272127
stop_event, rss_state, rss_thread = start_rss_sampler()
21282128
summary = run_olap_arcadedb(
21292129
db_path=db_path,
@@ -2180,7 +2180,7 @@ def main():
21802180
total_time = time.perf_counter() - start_time
21812181
else:
21822182
raise NotImplementedError(
2183-
"Only arcadedb, sqlite, duckdb, and postgresql are supported for now"
2183+
"Only arcadedb_sql, sqlite, duckdb, and postgresql are supported for now"
21842184
)
21852185

21862186
summary["total_time_s"] = total_time

bindings/python/examples/09_stackoverflow_graph_oltp.py

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -548,13 +548,9 @@ def verify_single_thread_series(
548548
verify_dir = db_path
549549
verify_dir.mkdir(parents=True, exist_ok=True)
550550
dataset_tag = args.dataset.replace("-", "_")
551-
arcadedb_oltp_language = (
552-
args.arcadedb_oltp_language if db_label == "arcadedb" else None
553-
)
554-
language_suffix = f"_{arcadedb_oltp_language}" if arcadedb_oltp_language else ""
555551
baseline_path = (
556552
verify_dir
557-
/ f"verify_09_graph_oltp_{db_label}{language_suffix}_{dataset_tag}_tx{args.transactions}_seed{args.seed}.json"
553+
/ f"verify_09_graph_oltp_{db_label}_{dataset_tag}_tx{args.transactions}_seed{args.seed}.json"
558554
)
559555

560556
current_payload = {
@@ -563,7 +559,6 @@ def verify_single_thread_series(
563559
"transactions": int(args.transactions),
564560
"seed": int(args.seed),
565561
"threads": int(args.threads),
566-
"arcadedb_oltp_language": arcadedb_oltp_language,
567562
"node_count": int(summary.get("node_count") or 0),
568563
"edge_count": int(summary.get("edge_count") or 0),
569564
"node_counts_by_type": normalize_count_dict(summary.get("node_counts_by_type")),
@@ -578,7 +573,6 @@ def write_baseline() -> None:
578573
"%Y-%m-%dT%H:%M:%SZ"
579574
),
580575
"source_db": db_label,
581-
"source_oltp_language": arcadedb_oltp_language,
582576
},
583577
"baseline": current_payload,
584578
}
@@ -2435,7 +2429,7 @@ def run_graph_oltp_arcadedb(
24352429
next_answer_id = load_info["max_ids"]["answer"] + 1
24362430
next_badge_id = load_info["max_ids"]["badge"] + 1
24372431
next_comment_id = load_info["max_ids"]["comment"] + 1
2438-
arcadedb_oltp_language = (oltp_language or "cypher").strip().lower()
2432+
arcadedb_mode = (oltp_language or "cypher").strip().lower()
24392433

24402434
def worker(ops: List[str], worker_id: int) -> Dict[str, List[float]]:
24412435
rng = random.Random(seed + worker_id)
@@ -2449,7 +2443,7 @@ def worker(ops: List[str], worker_id: int) -> Dict[str, List[float]]:
24492443
for op in ops:
24502444
start_time = time.perf_counter()
24512445

2452-
if arcadedb_oltp_language == "sql":
2446+
if arcadedb_mode == "sql":
24532447
try:
24542448
if op == "read":
24552449
read_kind = rng.choice(READ_TARGET_KINDS)
@@ -3640,7 +3634,6 @@ def do_delete():
36403634
"edge_count": edge_count,
36413635
"node_counts_by_type": node_counts_by_type,
36423636
"edge_counts_by_type": edge_counts_by_type,
3643-
"arcadedb_oltp_language": arcadedb_oltp_language,
36443637
}
36453638

36463639

@@ -7673,10 +7666,6 @@ def write_results(db_path: Path, args: argparse.Namespace, summary: dict):
76737666
"query_result_hash_stable": summary.get("query_result_hash_stable"),
76747667
"query_row_count_stable": summary.get("query_row_count_stable"),
76757668
"benchmark_scope_note": summary.get("benchmark_scope_note"),
7676-
"arcadedb_oltp_language": summary.get(
7677-
"arcadedb_oltp_language",
7678-
args.arcadedb_oltp_language if args.db == "arcadedb" else None,
7679-
),
76807669
}
76817670
results_path.parent.mkdir(parents=True, exist_ok=True)
76827671
with open(results_path, "w", encoding="utf-8") as handle:
@@ -7757,7 +7746,7 @@ def run_in_docker(args) -> bool:
77577746
filtered_args.append(arg)
77587747

77597748
arcadedb_wheel_mount_path = None
7760-
if args.db == "arcadedb":
7749+
if args.db.startswith("arcadedb_"):
77617750
wheel_candidates = sorted(
77627751
(repo_root / "bindings/python/dist").glob("*embed*.whl")
77637752
)
@@ -7845,15 +7834,16 @@ def main():
78457834
parser.add_argument(
78467835
"--db",
78477836
choices=[
7848-
"arcadedb",
7837+
"arcadedb_sql",
7838+
"arcadedb_cypher",
78497839
"ladybug",
78507840
"ladybugdb",
78517841
"graphqlite",
78527842
"sqlite_native",
78537843
"python_memory",
78547844
],
7855-
default="arcadedb",
7856-
help="Database to test (default: arcadedb)",
7845+
default="arcadedb_cypher",
7846+
help="Database to test (default: arcadedb_cypher)",
78577847
)
78587848
parser.add_argument(
78597849
"--threads",
@@ -7908,12 +7898,6 @@ def main():
79087898
action="store_true",
79097899
help="For threads=1 only, assert final graph counts match deterministic single-thread baseline",
79107900
)
7911-
parser.add_argument(
7912-
"--arcadedb-oltp-language",
7913-
choices=["cypher", "sql"],
7914-
default="cypher",
7915-
help="ArcadeDB OLTP CRUD language (default: cypher)",
7916-
)
79177901
parser.add_argument(
79187902
"--sqlite-profile",
79197903
choices=SQLITE_PROFILE_CHOICES,
@@ -7928,8 +7912,6 @@ def main():
79287912
parser.error("--jvm-heap-fraction must be > 0 and <= 1")
79297913
if args.verify_single_thread_series and args.threads != 1:
79307914
parser.error("--verify-single-thread-series requires --threads 1")
7931-
if args.db not in ("arcadedb",) and args.arcadedb_oltp_language != "cypher":
7932-
parser.error("--arcadedb-oltp-language is only applicable when --db arcadedb")
79337915

79347916
ran = run_in_docker(args)
79357917
if ran:
@@ -7940,7 +7922,7 @@ def main():
79407922
args.mem_limit,
79417923
args.jvm_heap_fraction,
79427924
)
7943-
if args.db == "arcadedb"
7925+
if args.db.startswith("arcadedb_")
79447926
else args.mem_limit
79457927
)
79467928
args.heap_size_effective = heap_size
@@ -7967,14 +7949,14 @@ def main():
79677949
print(f"Threads: {args.threads}")
79687950
print(f"Operations: {args.transactions:,}")
79697951
print(f"Batch size: {args.batch_size}")
7970-
if args.db == "arcadedb":
7952+
if args.db.startswith("arcadedb_"):
79717953
print(f"JVM heap size: {heap_size}")
7972-
print(f"ArcadeDB OLTP language: {args.arcadedb_oltp_language}")
7954+
print(f"ArcadeDB OLTP language: {args.db.removeprefix('arcadedb_')}")
79737955
print(f"DB path: {db_path}")
79747956
print(BENCHMARK_SCOPE_NOTE)
79757957
print()
79767958

7977-
if args.db == "arcadedb":
7959+
if args.db.startswith("arcadedb_"):
79787960
summary = run_graph_oltp_arcadedb(
79797961
db_path=db_path,
79807962
data_dir=data_dir,
@@ -7983,7 +7965,7 @@ def main():
79837965
threads=args.threads,
79847966
seed=args.seed,
79857967
jvm_kwargs=jvm_kwargs,
7986-
oltp_language=args.arcadedb_oltp_language,
7968+
oltp_language=args.db.removeprefix("arcadedb_"),
79877969
)
79887970
elif args.db in ("ladybug", "ladybugdb"):
79897971
summary = run_graph_oltp_ladybug(

bindings/python/examples/10_stackoverflow_graph_olap.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4799,7 +4799,7 @@ def write_results(db_path: Path, args: argparse.Namespace, summary: dict):
47994799
"arcadedb_olap_language",
48004800
(
48014801
args.arcadedb_olap_language
4802-
if args.db in ("arcadedb", "arcadedb_cypher")
4802+
if args.db in ("arcadedb_sql", "arcadedb_cypher")
48034803
else None
48044804
),
48054805
),
@@ -4945,7 +4945,7 @@ def run_in_docker(args) -> bool:
49454945
filtered_args.append(arg)
49464946

49474947
arcadedb_wheel_mount_path = None
4948-
if args.db in ("arcadedb", "arcadedb_cypher"):
4948+
if args.db in ("arcadedb_sql", "arcadedb_cypher"):
49494949
wheel_candidates = sorted(
49504950
(repo_root / "bindings/python/dist").glob("*embed*.whl")
49514951
)
@@ -5033,16 +5033,16 @@ def main():
50335033
parser.add_argument(
50345034
"--db",
50355035
choices=[
5036-
"arcadedb",
5036+
"arcadedb_sql",
50375037
"arcadedb_cypher",
50385038
"ladybug",
50395039
"ladybugdb",
50405040
"graphqlite",
50415041
"sqlite_native",
50425042
"python_memory",
50435043
],
5044-
default="arcadedb",
5045-
help="Database to test (default: arcadedb)",
5044+
default="arcadedb_cypher",
5045+
help="Database to test (default: arcadedb_cypher)",
50465046
)
50475047
parser.add_argument(
50485048
"--batch-size",
@@ -5122,7 +5122,9 @@ def main():
51225122
if args.jvm_heap_fraction <= 0 or args.jvm_heap_fraction > 1:
51235123
parser.error("--jvm-heap-fraction must be > 0 and <= 1")
51245124

5125-
args.arcadedb_olap_language = "cypher"
5125+
args.arcadedb_olap_language = None
5126+
if args.db.startswith("arcadedb_"):
5127+
args.arcadedb_olap_language = args.db.removeprefix("arcadedb_")
51265128

51275129
ran = run_in_docker(args)
51285130
if ran:
@@ -5133,7 +5135,7 @@ def main():
51335135
args.mem_limit,
51345136
args.jvm_heap_fraction,
51355137
)
5136-
if args.db in ("arcadedb", "arcadedb_cypher")
5138+
if args.db in ("arcadedb_sql", "arcadedb_cypher")
51375139
else args.mem_limit
51385140
)
51395141
args.heap_size_effective = heap_size
@@ -5155,7 +5157,7 @@ def main():
51555157
print("=" * 80)
51565158
print(f"Dataset: {args.dataset}")
51575159
print(f"DB: {args.db}")
5158-
if args.db in ("arcadedb", "arcadedb_cypher"):
5160+
if args.db in ("arcadedb_sql", "arcadedb_cypher"):
51595161
print(f"ArcadeDB OLAP language: {args.arcadedb_olap_language}")
51605162
if args.db in ("sqlite_native", "graphqlite", "python_memory"):
51615163
print(f"SQLite profile: {args.sqlite_profile}")
@@ -5171,7 +5173,7 @@ def main():
51715173
stop_event, rss_state, rss_thread = start_rss_sampler()
51725174
start_time = time.perf_counter()
51735175

5174-
if args.db in ("arcadedb", "arcadedb_cypher"):
5176+
if args.db in ("arcadedb_sql", "arcadedb_cypher"):
51755177
summary = run_olap_arcadedb(
51765178
db_path=db_path,
51775179
data_dir=data_dir,

bindings/python/examples/11_vector_index_build.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ def run_in_docker(args) -> bool:
14211421
filtered_args.extend(["--qdrant-host", "host.docker.internal"])
14221422

14231423
arcadedb_wheel_mount_path = None
1424-
if args.backend == "arcadedb":
1424+
if args.backend == "arcadedb_sql":
14251425
wheel_candidates = sorted(
14261426
(repo_root / "bindings/python/dist").glob("*embed*.whl")
14271427
)
@@ -1443,7 +1443,7 @@ def run_in_docker(args) -> bool:
14431443
if args.backend == "pgvector" and image == "python:3.12-slim":
14441444
image = default_docker_image(args.backend)
14451445

1446-
if args.backend == "arcadedb":
1446+
if args.backend == "arcadedb_sql":
14471447
inner_cmd = " && ".join(
14481448
[
14491449
"python -m venv /tmp/bench-venv",
@@ -1618,9 +1618,9 @@ def main() -> None:
16181618
)
16191619
parser.add_argument(
16201620
"--backend",
1621-
choices=["arcadedb", "pgvector", "qdrant", "milvus", "faiss", "lancedb"],
1622-
default="arcadedb",
1623-
help="Vector backend (default: arcadedb)",
1621+
choices=["arcadedb_sql", "pgvector", "qdrant", "milvus", "faiss", "lancedb"],
1622+
default="arcadedb_sql",
1623+
help="Vector backend (default: arcadedb_sql)",
16241624
)
16251625
parser.add_argument(
16261626
"--dataset",
@@ -1820,7 +1820,7 @@ def record(name: str, result, dur: float, rss_start: float, rss_end: float):
18201820

18211821
runtime_versions: dict[str, str | None] = {}
18221822

1823-
if args.backend == "arcadedb":
1823+
if args.backend == "arcadedb_sql":
18241824
stop_cpu = start_cpu_logger(2)
18251825
import arcadedb_embedded as arcadedb
18261826

@@ -2307,7 +2307,7 @@ def server_pid_provider() -> int | None:
23072307
},
23082308
"environment": collect_runtime_metadata(
23092309
args,
2310-
heap_size=(arcadedb_heap_size if args.backend == "arcadedb" else None),
2310+
heap_size=(arcadedb_heap_size if args.backend == "arcadedb_sql" else None),
23112311
runtime_versions=runtime_versions,
23122312
),
23132313
"budget": budget_allocation_report(args),
@@ -2346,7 +2346,7 @@ def server_pid_provider() -> int | None:
23462346
},
23472347
"arcadedb": {
23482348
"heap_size_effective": (
2349-
arcadedb_heap_size if args.backend == "arcadedb" else None
2349+
arcadedb_heap_size if args.backend == "arcadedb_sql" else None
23502350
),
23512351
},
23522352
"qdrant": {

0 commit comments

Comments
 (0)