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

Side by Side Diff: components/test/run_all_perftests.cc

Issue 2358063002: Preparing components_perftests (Closed)
Patch Set: Attempt to guess how generate_perf_json.py works Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <memory>
6
7 #include "base/memory/ptr_util.h"
8 #include "base/test/launcher/unit_test_launcher.h"
9 #include "base/test/perf_log.h"
10 #include "components/test/components_test_suit.h"
11
12 class ComponentsPerfTestSuite : public ComponentsTestSuite {
13 public:
14 ComponentsPerfTestSuite(int argc, char** argv)
15 : ComponentsTestSuite(argc, argv) {}
16
17 void Initialize() final {
18 ComponentsTestSuite::Initialize();
19 CHECK(base::InitPerfLog());
20 }
21
22 void Shutdown() final {
23 base::FinalizePerfLog();
24 ComponentsTestSuite::Shutdown();
25 }
26 };
27
28 int main(int argc, char** argv) {
29 auto test_suite = base::MakeUnique<ComponentsPerfTestSuite>(argc, argv);
30 // Raise to high priority to have more precise measurements. Since we don't
31 // aim at 1% precision, it is not necessary to run at realtime level.
32 if (!base::debug::BeingDebugged())
33 base::RaiseProcessToHighPriority();
34 return base::LaunchUnitTestsSerially(
35 argc, argv, CreateCallbackForLaunch(std::move(test_suite)));
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698