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

Unified Diff: test/perf/input/todomvc_test.html

Issue 11683002: Setting up benchmarks and perf utilities (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: john comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/perf/input/todomvc_common.dart ('k') | test/perf/perf.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/perf/input/todomvc_test.html
diff --git a/test/data/input/todomvc_mainpage2_test.html b/test/perf/input/todomvc_test.html
similarity index 78%
copy from test/data/input/todomvc_mainpage2_test.html
copy to test/perf/input/todomvc_test.html
index 5068b36d3b0d4c421542d0c807a93ba94938c022..aab954199411673f9c308f87a216f335c3917723 100644
--- a/test/data/input/todomvc_mainpage2_test.html
+++ b/test/perf/input/todomvc_test.html
@@ -7,15 +7,20 @@ BSD-style license that can be found in the LICENSE file.
<html lang="en">
<head>
<!--
- This test runs the TodoMVC app and evaluates that it renders correctly if a
- single item is present in the todo list.
+ This performance test runs the TodoMVC app and uses the application as follows:
+ * on each iteration:
+ * clear all todos
+ * add 5 todos
+ * mark 1 as done
+ * clear the todo marked as done.
-->
-<meta charset="utf-8">
+ <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="components" href="example/todomvc/router_options.html">
<link rel="components" href="example/todomvc/todo_row.html">
<link rel="stylesheet" href="example/todomvc/base.css">
<script type="application/javascript" src="testing.js"></script>
+ <script type="application/javascript" src="start_dart.js"></script>
<title>dart - TodoMVC</title>
</head>
<body>
@@ -70,17 +75,34 @@ import 'dart:html';
import 'package:web_ui/web_ui.dart';
import 'example/todomvc/main.dart' as todomvc_main;
import 'example/todomvc/model.dart';
+import 'perf_common.dart';
+import 'todomvc_common.dart';
final addTodo = todomvc_main.addTodo;
main() {
+ useShadowDom = false;
todomvc_main.main();
window.setTimeout(() {
- app.todos.add(new Todo('hola'));
- dispatch();
- window.setTimeout(() => window.postMessage('done', '*'), 0);
+ var bench = new TodoMvcBenchmark();
+ perfDone(bench.measure());
}, 0);
}
+
+class TodoMvcBenchmark extends BenchmarkBase {
+ TodoMvcBenchmark() : super('todomvc');
+ void run() {
+ app.todos.clear();
+ dispatch();
+ addNote("one");
+ addNote("two");
+ addNote("three");
+ addNote("four");
+ addNote("five");
+ markChecked(3);
+ clearCompleted();
+ }
+}
</script>
</body>
</html>
« no previous file with comments | « test/perf/input/todomvc_common.dart ('k') | test/perf/perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698