Index: third_party/pkg/di/benchmark/injector_benchmark_common.dart |
diff --git a/third_party/pkg/di/benchmark/injector_benchmark_common.dart b/third_party/pkg/di/benchmark/injector_benchmark_common.dart |
deleted file mode 100644 |
index 88344f5450e9b0ae0ef68c36d6a9907970521a58..0000000000000000000000000000000000000000 |
--- a/third_party/pkg/di/benchmark/injector_benchmark_common.dart |
+++ /dev/null |
@@ -1,66 +0,0 @@ |
-library di.injector_benchmark_common; |
- |
-import 'package:benchmark_harness/benchmark_harness.dart'; |
-import 'package:di/di.dart'; |
- |
-int count = 0; |
- |
-class InjectorBenchmark extends BenchmarkBase { |
- var injectorFactory; |
- var module; |
- |
- InjectorBenchmark(name, this.injectorFactory) : super(name); |
- |
- void run() { |
- Injector injector = injectorFactory([module]); |
- injector.get(A); |
- injector.get(B); |
- |
- var childInjector = injector.createChild([module]); |
- childInjector.get(A); |
- childInjector.get(B); |
- } |
- |
- setup() { |
- module = new Module() |
- ..type(A) |
- ..type(B) |
- ..type(C) |
- ..type(D) |
- ..type(E); |
- } |
- |
- teardown() { |
- print(count); |
- } |
-} |
- |
-class A { |
- A(B b, C c) { |
- count++; |
- } |
-} |
- |
-class B { |
- B(D b, E c) { |
- count++; |
- } |
-} |
- |
-class C { |
- C() { |
- count++; |
- } |
-} |
- |
-class D { |
- D() { |
- count++; |
- } |
-} |
- |
-class E { |
- E() { |
- count++; |
- } |
-} |