CacheBenchmark class
A utility class for benchmarking cache operations.
Constructors
- CacheBenchmark.new(DataCacheX _cache)
- Creates a new instance of CacheBenchmark.
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
-
benchmarkDelete(
{required String keyPrefix, required int iterations}) → Future< BenchmarkResult> - Runs a benchmark for delete operations.
-
benchmarkGet(
{required String key, required int iterations, bool useAsync = false}) → Future< BenchmarkResult> - Runs a benchmark for get operations.
-
benchmarkPut(
{required String keyPrefix, required dynamic value, required int iterations, CachePolicy? policy, bool useAsync = false}) → Future< BenchmarkResult> - Runs a benchmark for put operations.
-
compareAsyncVsSync(
{required int iterations, required int valueSize}) → Future< BenchmarkComparison> - Compares the performance of synchronous and asynchronous operations.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runBenchmark(
{required Future< void> operation(), required int iterations, required String name}) → Future<BenchmarkResult> - Runs a benchmark for the given operation.
-
runComprehensiveBenchmark(
{required int iterations, required int valueSize, bool useAsync = false}) → Future< List< BenchmarkResult> > - Runs a comprehensive benchmark suite.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited