BenchmarkService class

Performance benchmark service

Constructors

BenchmarkService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

aggregateRoundStats(List<DetailedBenchmarkStats> rounds) DetailedBenchmarkStats
Aggregate multiple round stats by flattening all measured samples.
benchmark(String name, Future<void> fn(), {int iterations = 10, required BenchmarkCategory category}) Future<BenchmarkResult>
Run multiple iterations and measure avg/min/max
benchmarkDetailed(Future<void> fn(), {int warmupIterations = 5, int measuredIterations = 30}) Future<DetailedBenchmarkStats>
Run detailed benchmark with warmup and reproducible summary.
benchmarkEmbed(String text, {int iterations = 10}) Future<BenchmarkResult>
Embedding generation benchmark (ONNX-powered)
benchmarkHybridSearch(String dbPath, String queryText, List<double> queryEmbedding, int docCount, {int iterations = 20}) Future<BenchmarkResult>
Hybrid Search benchmark
benchmarkSearch(String dbPath, List<double> queryEmbedding, int docCount, {int iterations = 20}) Future<BenchmarkResult>
Search benchmark (Rust HNSW-powered)
benchmarkTokenize(String text, {int iterations = 50}) Future<BenchmarkResult>
Tokenization benchmark (Rust-powered)
collectSamples(Future<void> fn(), {int warmupIterations = 5, int measuredIterations = 30}) Future<List<double>>
Collect measured samples after warmup.
measureMs(Future<void> fn()) Future<double>
Measure execution time of async code block
measureMsSync(void fn()) double
Measure execution time of sync code block
runFullBenchmark({required String dbPath, dynamic onProgress(String)?}) Future<List<BenchmarkResult>>
Run full benchmark suite
summarizeSamples(List<double> samplesMs, {required int warmupIterations}) DetailedBenchmarkStats
Summarize measured samples with p50/p95/stddev.