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

Unified Diff: samples/third_party/todomvc_performance/web/performance.dart

Issue 204733004: Added TodoMVC startup benchmarks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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: samples/third_party/todomvc_performance/web/performance.dart
diff --git a/samples/third_party/todomvc_performance/web/performance.dart b/samples/third_party/todomvc_performance/web/performance.dart
new file mode 100644
index 0000000000000000000000000000000000000000..93ce1dc4f367ac74cdbf35e406d1a3482a6e92f1
--- /dev/null
+++ b/samples/third_party/todomvc_performance/web/performance.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library todomvc_performance;
+
+import 'dart:async';
+import 'dart:html';
+import 'dart:js' as js;
+import 'package:polymer/polymer.dart';
+import 'package:web_components/polyfill.dart';
+import 'elements/td_model.dart';
+
+/**
+ * This test determines how fast the TodoMVC app has loaded.
+ */
+main() {
+ initPolymer();
+ Polymer.onReady.then((_) {
+ var endInitTime = new DateTime.now();
+ window.postMessage(endInitTime.millisecondsSinceEpoch, '*');
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698