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

Side by Side Diff: chrome/browser/metrics/startup_metrics_browsertest.cc

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Don't wait for histograms that are not reported during browser_tests. Created 3 years, 8 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 2017 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 <set>
6
7 #include "base/metrics/histogram_samples.h"
8 #include "base/metrics/statistics_recorder.h"
9 #include "base/run_loop.h"
10 #include "chrome/test/base/in_process_browser_test.h"
11
12 using StartupMetricsTest = InProcessBrowserTest;
13
14 namespace {
15
16 constexpr const char* kStartupMetrics[] = {
17 "Startup.BrowserMainToRendererMain",
18 "Startup.BrowserOpenTabs",
19 "Startup.BrowserWindow.FirstPaint",
20 "Startup.BrowserWindow.FirstPaint.CompositingEnded",
21 "Startup.BrowserWindowDisplay",
22 "Startup.FirstWebContents.MainFrameLoad2",
23 "Startup.FirstWebContents.MainNavigationFinished",
24 "Startup.FirstWebContents.MainNavigationStart",
25 "Startup.FirstWebContents.NonEmptyPaint2",
26
27 // The following histograms depend on normal browser startup through
28 // BrowserMain and are as such not caught by this browser test.
29 // "Startup.BrowserMessageLoopStartHardFaultCount",
30 // "Startup.BrowserMessageLoopStartTime",
31 // "Startup.BrowserMessageLoopStartTimeFromMainEntry2",
32 // "Startup.LoadTime.ExeMainToDllMain2",
33 // "Startup.LoadTime.ProcessCreateToDllMain2",
34 // "Startup.LoadTime.ProcessCreateToExeMain2",
35 // "Startup.SystemUptime",
36 // "Startup.Temperature",
37 };
38
39 } // namespace
40
41 // Verify that startup histograms are logged on browser startup.
42 IN_PROC_BROWSER_TEST_F(StartupMetricsTest, ReportsValues) {
43 for (auto* const histogram : kStartupMetrics) {
44 while (!base::StatisticsRecorder::FindHistogram(histogram))
45 base::RunLoop().RunUntilIdle();
46 }
47 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/first_web_contents_profiler.cc ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698