Benchmarking helpers for terminusdb_ex.
Provides utilities for generating test data, seeding databases, and creating representative WOQL queries for benchmarking.
Quick start
# Generate test data
people = TerminusDB.Benchmark.generate_data(1000)
# Seed a database
config = TerminusDB.Benchmark.seed_database(config, 500)
# Get representative queries
queries = TerminusDB.Benchmark.generate_queries(100)
Summary
Functions
Generates count Person documents with random names and ages.
Returns path patterns of varying complexity for benchmarking.
Returns a list of representative WOQL queries for benchmarking.
Creates a database with a Person schema and inserts count documents.
Functions
@spec generate_data(pos_integer()) :: [map()]
Generates count Person documents with random names and ages.
@spec generate_path_patterns() :: [String.t()]
Returns path patterns of varying complexity for benchmarking.
@spec generate_queries(pos_integer()) :: [TerminusDB.WOQL.t()]
Returns a list of representative WOQL queries for benchmarking.
@spec seed_database(TerminusDB.Config.t(), pos_integer()) :: {TerminusDB.Config.t(), String.t()}
Creates a database with a Person schema and inserts count documents.
Returns {config, db_name} so callers can clean up the database after
benchmarking.