OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 library observe.test.benchmark.setup_observable_list_benchmark; | |
5 | |
6 import 'package:observe/observe.dart'; | |
7 import 'setup_observation_benchmark_base.dart'; | |
8 | |
9 class SetupObservableListBenchmark extends SetupObservationBenchmarkBase { | |
10 final int elementCount = 100; | |
11 | |
12 SetupObservableListBenchmark(int objectCount, String config) : super( | |
13 'SetupObservableListBenchmark:$objectCount:$config', objectCount, | |
14 config); | |
15 | |
16 @override | |
17 ObservableList newObject() { | |
18 var list = new ObservableList(); | |
19 for (int i = 0; i < elementCount; i++) { | |
20 list.add(i); | |
21 } | |
22 list.deliverChanges(); | |
23 list.deliverListChanges(); | |
24 return list; | |
25 } | |
26 } | |
OLD | NEW |