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

Unified Diff: samples/third_party/todomvc_performance/web/startup-performance.html

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/startup-performance.html
diff --git a/samples/third_party/todomvc_performance/web/startup-performance.html b/samples/third_party/todomvc_performance/web/startup-performance.html
new file mode 100644
index 0000000000000000000000000000000000000000..7a403589dba15c6962a8a17574c7a3cc7e04fc00
--- /dev/null
+++ b/samples/third_party/todomvc_performance/web/startup-performance.html
@@ -0,0 +1,57 @@
+<!doctype html>
+
+<!--
+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.
+-->
+
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+ <script type="application/javascript">
+
+ // TODO(efortuna): Revisit in a bit -- should we use
+ // performance.timing.navigationStart or performance.timing.domLoading?
Jennifer Messerly 2014/03/28 19:51:07 yeah, the nice thing about using these times is yo
+ // navigationStart may be a bit noisy. Re-evaluate after we have more
+ // data.
+ var startTime = new Date().getTime();
+ function onReceive(e) {
+ // Listen for a timestamp signifying when app startup is complete.
+ var endTime = e.data;
+ var startupTime = endTime - startTime;
+ document.body.innerHTML = 'The startup time is ' + startupTime +
+ ' milliseconds.';
+ reportPerformanceTestDone();
+ }
+ window.addEventListener('message', onReceive, true);
+ </script>
+
+ <script src="packages/browser_controller/perf_test_controller.js"></script>
+ <title> TodoMVC • Startup Performance </title>
+ <link rel="stylesheet" href="app/app.css">
+ <link rel="import" href="packages/polymer/polymer.html">
+ <link rel="import" href="lib-elements/polymer_localstorage.html">
+ <link rel="import" href="elements/td_model.html">
+ <link rel="import" href="elements/td_todos.html">
+ </head>
+ <body>
+ <header>
+ <h1>todos</h1>
+ </header>
+ <polymer-localstorage id="storage" name="todos-polymer">
+ </polymer-localstorage>
+ <td-model id="model" storageId="storage"></td-model>
+ <td-todos modelId="model"></td-todos>
+ <script type="application/dart" src="performance.dart"></script>
+ <footer id="info">
+ <p>Double-click to edit a todo</p>
+ <p>Created by <a href="https://www.dartlang.org/polymer-dart/">
+ The Polymer.dart Authors</a></p>
+ <p>This example was built using a pre-alpha version of Polymer.dart.</p>
+ <p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
+ </footer>
+ </body>
+</html>
« no previous file with comments | « samples/third_party/todomvc_performance/web/performance.dart ('k') | tools/testing/perf_testing/run_perf_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698