Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: third_party/pkg/di/benchmark/injector_benchmark_common.dart

Issue 176943008: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
index 752833a705242aeb13d552ac68e2be63e9483b88..88344f5450e9b0ae0ef68c36d6a9907970521a58 100644
--- a/third_party/pkg/di/benchmark/injector_benchmark_common.dart
+++ b/third_party/pkg/di/benchmark/injector_benchmark_common.dart
@@ -3,6 +3,8 @@ 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;
@@ -27,21 +29,38 @@ class InjectorBenchmark extends BenchmarkBase {
..type(D)
..type(E);
}
+
+ teardown() {
+ print(count);
+ }
}
class A {
- A(B b, C c);
+ A(B b, C c) {
+ count++;
+ }
}
class B {
- B(D b, E c);
+ B(D b, E c) {
+ count++;
+ }
}
class C {
+ C() {
+ count++;
+ }
}
class D {
+ D() {
+ count++;
+ }
}
class E {
+ E() {
+ count++;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698