BenchmarkService class
Performance benchmark service
Constructors
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
-
benchmark(
String name, Future< void> fn(), {int iterations = 10, required BenchmarkCategory category}) → Future<BenchmarkResult> - Run multiple iterations and measure avg/min/max
-
benchmarkEmbed(
String text, {int iterations = 10}) → Future< BenchmarkResult> - Embedding generation benchmark (ONNX-powered)
-
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)
-
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