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

Unified Diff: benchmarks/startup/startup.cc

Issue 724243002: Add a startup benchmark and rudimentary scripts for running benchmarks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « benchmarks/startup/run.py ('k') | mojo/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: benchmarks/startup/startup.cc
diff --git a/benchmarks/startup/startup.cc b/benchmarks/startup/startup.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4c38ba9bb59287d0c2d9bf50de40ec95e8490f7f
--- /dev/null
+++ b/benchmarks/startup/startup.cc
@@ -0,0 +1,15 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdlib.h>
+
+#include "mojo/public/c/system/main.h"
+
+MojoResult MojoMain(MojoHandle shell_handle) {
+ // Terminate the process as soon as we reach the application entrypoint. The
+ // testing script will instruct the shell to load this application and
+ // measure the execution time, which reflects the startup performance.
+ exit(0);
+ return MOJO_RESULT_OK;
+}
« no previous file with comments | « benchmarks/startup/run.py ('k') | mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698