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 | |
5 library polymer_expressions.benchmark.parse; | |
6 | |
7 import 'package:benchmark_harness/benchmark_harness.dart'; | |
8 import 'package:polymer_expressions/parser.dart' show parse; | |
9 | |
10 /** | |
11 * Measures pure parsing time of several expressions | |
12 */ | |
13 class PolymerParseBenchmark extends BenchmarkBase { | |
14 PolymerParseBenchmark() : super('PolymerParseBenchmark'); | |
15 | |
16 run() { | |
17 parse('foo.bar.baz'); | |
18 parse('f()'); | |
19 parse('(1 + 2) * 3'); | |
20 parse('1 + 2.0 + false + "abcdefg" + {"a": 1}'); | |
21 parse('(a * (b * (c * (d * (e)))))'); | |
22 parse('a(b(c(d(e(f)))))'); | |
23 } | |
24 } | |
25 | |
26 main() { | |
27 new PolymerParseBenchmark().report(); | |
28 } | |
OLD | NEW |