mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
24 lines
592 B
Dart
24 lines
592 B
Dart
import 'package:benchmark_harness/benchmark_harness.dart';
|
|
import 'package:benchmark_cherrypick/di_adapters/di_adapter.dart';
|
|
import 'package:benchmark_cherrypick/scenarios/app_module.dart';
|
|
import 'package:benchmark_cherrypick/scenarios/foo_service.dart';
|
|
|
|
class RegisterAndResolveBenchmark extends BenchmarkBase {
|
|
final DIAdapter di;
|
|
|
|
RegisterAndResolveBenchmark(this.di) : super('RegisterAndResolve');
|
|
|
|
@override
|
|
void setup() {
|
|
di.setupModules([AppModule()]);
|
|
}
|
|
|
|
@override
|
|
void run() {
|
|
di.resolve<FooService>();
|
|
}
|
|
|
|
@override
|
|
void teardown() => di.teardown();
|
|
}
|