| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "apps/benchmark/event.h" | 10 #include "apps/benchmark/event.h" |
| 11 #include "apps/benchmark/measurements.h" | 11 #include "apps/benchmark/measurements.h" |
| 12 #include "apps/benchmark/run_args.h" | 12 #include "apps/benchmark/run_args.h" |
| 13 #include "apps/benchmark/trace_collector_client.h" | 13 #include "apps/benchmark/trace_collector_client.h" |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
| 19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "base/trace_event/trace_event.h" | 21 #include "base/trace_event/trace_event.h" |
| 22 #include "mojo/application/application_runner_chromium.h" | 22 #include "mojo/application/application_runner_chromium.h" |
| 23 #include "mojo/public/c/system/main.h" | 23 #include "mojo/public/c/system/main.h" |
| 24 #include "mojo/public/cpp/application/application_connection.h" | 24 #include "mojo/public/cpp/application/application_connection.h" |
| 25 #include "mojo/public/cpp/application/application_delegate.h" | 25 #include "mojo/public/cpp/application/application_delegate.h" |
| 26 #include "mojo/public/cpp/application/application_impl.h" | 26 #include "mojo/public/cpp/application/application_impl.h" |
| 27 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" | 27 #include "mojo/services/tracing/interfaces/tracing.mojom.h" |
| 28 | 28 |
| 29 namespace benchmark { | 29 namespace benchmark { |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 class BenchmarkApp : public mojo::ApplicationDelegate, | 32 class BenchmarkApp : public mojo::ApplicationDelegate, |
| 33 public TraceCollectorClient::Receiver { | 33 public TraceCollectorClient::Receiver { |
| 34 public: | 34 public: |
| 35 BenchmarkApp() {} | 35 BenchmarkApp() {} |
| 36 ~BenchmarkApp() override {} | 36 ~BenchmarkApp() override {} |
| 37 | 37 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 }; | 146 }; |
| 147 } // namespace | 147 } // namespace |
| 148 } // namespace benchmark | 148 } // namespace benchmark |
| 149 | 149 |
| 150 MojoResult MojoMain(MojoHandle application_request) { | 150 MojoResult MojoMain(MojoHandle application_request) { |
| 151 mojo::ApplicationRunnerChromium runner(new benchmark::BenchmarkApp); | 151 mojo::ApplicationRunnerChromium runner(new benchmark::BenchmarkApp); |
| 152 auto ret = runner.Run(application_request); | 152 auto ret = runner.Run(application_request); |
| 153 fflush(nullptr); | 153 fflush(nullptr); |
| 154 return ret; | 154 return ret; |
| 155 } | 155 } |
| OLD | NEW |