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

Side by Side Diff: test/perf/input/bindings_10_test.html

Issue 11683002: Setting up benchmarks and perf utilities (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 for details. All rights reserved. Use of this source code is governed by a
5 BSD-style license that can be found in the LICENSE file.
6 -->
7 <html lang="en">
8 <head>
9 <!--
10 This performance test updates a 10 text binding (depending on the same
11 variable) on each iteration.
12 -->
13 <meta charset="utf-8">
14 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
15 <script type="application/javascript" src="testing.js"></script>
16 <script type="application/javascript" src="start_dart.js"></script>
17 </head>
18 <body>
19 <div>
20 <span>{{x}}</span>
21 <span>{{x}}</span>
22 <span>{{x}}</span>
23 <span id='test'>{{x}}</span>
24 <span>{{x}}</span>
25 <span>{{x}}</span>
26 <span>{{x}}</span>
27 <span>{{x}}</span>
28 <span>{{x}}</span>
29 <span>{{x}}</span>
30 </div>
31 <script type="application/dart">
32 import 'dart:html';
33 import 'package:web_ui/web_ui.dart';
34 import 'package:unittest/unittest.dart';
35 import 'perf_common.dart';
36
37 main() {
38 useShadowDom = false;
39 window.setTimeout(() {
40 var bench = new BindingBenchmark();
41 perfDone(bench.measure());
42 }, 0);
43 }
44
45 int x = 0;
46
47 class BindingBenchmark extends BenchmarkBase {
48 BindingBenchmark() : super('bind-10');
49 run() {
50 x++;
51 dispatch();
52 expect(query('#test').innerHTML, "$x");
53 }
54 }
55 </script>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698