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

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

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Fix gab's and asvitkine's remarks. 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 // These histograms rely on normal browser startup through BrowserMain,
28 // which calls BrowserMainRunnerImpl, which calls ChromeBrowserMainParts
29 // which reports these metrics.
30 // Currently they're not reported at all during browser_tests.
themblsha 2017/04/19 15:06:09 Should I create a new crbug for this? Fixing this
gab 2017/04/19 18:45:43 Ah, right, let's not bother. Leaving them commente
themblsha 2017/04/20 10:42:23 Done. Startup.BrowserMessageLoopStartHardFaultCou
31
32 // "Startup.BrowserMessageLoopStartTime",
33 // "Startup.BrowserMessageLoopStartTimeFromMainEntry2",
34 // "Startup.LoadTime.ExeMainToDllMain2",
35 // "Startup.LoadTime.ProcessCreateToDllMain2",
36 // "Startup.LoadTime.ProcessCreateToExeMain2",
37 // "Startup.SystemUptime",
38
39 #if defined(OS_WIN)
40 "Startup.BrowserMessageLoopStartHardFaultCount",
41 "Startup.Temperature",
42 #endif // defined(OS_WIN)
43 };
44
45 } // namespace
46
47 // Verify that startup histograms are logged on browser startup.
48 IN_PROC_BROWSER_TEST_F(StartupMetricsTest, ReportsValues) {
49 for (auto* const histogram : kStartupMetrics) {
50 while (!base::StatisticsRecorder::FindHistogram(histogram))
51 base::RunLoop().RunUntilIdle();
52 }
53 }
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