[OmniboxPopup] Introduce FCP metrics for native and WebUI omnibox popup [chromium/src : main]

0 views
Skip to first unread message

Ming-Ying Chung (Gerrit)

unread,
Mar 12, 2026, 7:03:37 PM (8 hours ago) Mar 12
to Tom Lukaszewicz, Paul Adedeji, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, speed-metr...@chromium.org, csharris...@chromium.org, bmcquad...@chromium.org, speed-metrics...@chromium.org, asvitkine...@chromium.org, omnibox-...@chromium.org, loading-rev...@chromium.org, jdonnel...@chromium.org
Attention needed from Paul Adedeji and Tom Lukaszewicz

Ming-Ying Chung added 2 comments

Patchset-level comments
File-level comment, Patchset 5:
Ming-Ying Chung . resolved

PTAL sorry I've to update this CL quite a bit as I found that some metrics don't meet our requirement. This CL now only logc 1 new metric for WebUI / native view.

File chrome/browser/page_load_metrics/observers/top_chrome_webui_metrics_observer.cc
Line 58, Patchset 4:void TopChromeWebUIMetricsObserver::OnFirstPaintInPage(
const page_load_metrics::mojom::PageLoadTiming& timing) {
CHECK(timing.paint_timing->first_paint.has_value());

// Time from navigation to FP. They can be very large for preloaded WebUIs
// because the FP is not recorded until the WebUI is actually shown.
base::TimeDelta first_paint = timing.paint_timing->first_paint.value();
PAGE_LOAD_HISTOGRAM(GetMetricName(webui_name_, "NavigationToFirstPaint"),
first_paint);

// Time from request to FP. This metric disregards time spent in the
// background, which is non-zero when the WebUI is preloaded.
base::TimeDelta background_time = GetBackgroundTime(GetDelegate());
PAGE_LOAD_SHORT_HISTOGRAM(GetMetricName(webui_name_, "RequestToFirstPaint"),
first_paint - background_time);
}
Ming-Ying Chung . resolved

@paula...@google.com I am struggling to figure out why FirstPaint is triggered for webui omnibox popup but not FirstContentfulPaint. Maybe your knowledge can help:

- Is WebUI OmniboxPopup preloaded in background?
- If so,
- is it set to visible only when user interacts with the search bar?
- any of the preloaded UI being displayed before user interaction?
Ming-Ying Chung

Resolved. we removed FP metrics due to these. See the updated cl description.

Open in Gerrit

Related details

Attention is currently required from:
  • Paul Adedeji
  • Tom Lukaszewicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I955a2f3bae46cab8e40811b55502bdd0f1fca168
Gerrit-Change-Number: 7650781
Gerrit-PatchSet: 5
Gerrit-Owner: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Paul Adedeji <paula...@google.com>
Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Paul Adedeji <paula...@google.com>
Gerrit-Attention: Tom Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Mar 2026 23:03:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ming-Ying Chung <my...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Tom Lukaszewicz (Gerrit)

unread,
Mar 12, 2026, 7:17:30 PM (8 hours ago) Mar 12
to Ming-Ying Chung, Paul Adedeji, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, speed-metr...@chromium.org, csharris...@chromium.org, bmcquad...@chromium.org, speed-metrics...@chromium.org, asvitkine...@chromium.org, omnibox-...@chromium.org, loading-rev...@chromium.org, jdonnel...@chromium.org
Attention needed from Ming-Ying Chung and Paul Adedeji

Tom Lukaszewicz voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Ming-Ying Chung
  • Paul Adedeji
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I955a2f3bae46cab8e40811b55502bdd0f1fca168
Gerrit-Change-Number: 7650781
Gerrit-PatchSet: 7
Gerrit-Owner: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Paul Adedeji <paula...@google.com>
Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Paul Adedeji <paula...@google.com>
Gerrit-Attention: Ming-Ying Chung <my...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Mar 2026 23:16:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Ming-Ying Chung (Gerrit)

unread,
Mar 12, 2026, 9:45:03 PM (5 hours ago) Mar 12
to Tom Lukaszewicz, Paul Adedeji, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, speed-metr...@chromium.org, csharris...@chromium.org, bmcquad...@chromium.org, speed-metrics...@chromium.org, asvitkine...@chromium.org, omnibox-...@chromium.org, loading-rev...@chromium.org, jdonnel...@chromium.org
Attention needed from Paul Adedeji

Ming-Ying Chung voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Paul Adedeji
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I955a2f3bae46cab8e40811b55502bdd0f1fca168
Gerrit-Change-Number: 7650781
Gerrit-PatchSet: 8
Gerrit-Owner: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Paul Adedeji <paula...@google.com>
Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Paul Adedeji <paula...@google.com>
Gerrit-Comment-Date: Fri, 13 Mar 2026 01:44:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Mar 12, 2026, 11:09:48 PM (4 hours ago) Mar 12
to Ming-Ying Chung, Tom Lukaszewicz, Paul Adedeji, Chromium Metrics Reviews, AyeAye, speed-metr...@chromium.org, csharris...@chromium.org, bmcquad...@chromium.org, speed-metrics...@chromium.org, asvitkine...@chromium.org, omnibox-...@chromium.org, loading-rev...@chromium.org, jdonnel...@chromium.org

Chromium LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

7 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: chrome/browser/ui/views/omnibox/omnibox_popup_view_views_browsertest.cc
Insertions: 13, Deletions: 0.

@@ -60,6 +60,10 @@
#include "ui/views/widget/widget.h"
#include "url/gurl.h"

+#if BUILDFLAG(IS_OZONE)
+#include "ui/ozone/public/ozone_platform.h"
+#endif
+
#if defined(USE_AURA)
#include "ui/aura/window.h"
#endif
@@ -1106,6 +1110,15 @@
// Verifies that the TopChromeUI metrics are recorded for native UI.
IN_PROC_BROWSER_TEST_F(OmniboxPopupViewViewsTest,
EmitTopChromeWebUIMetricsNative) {
+#if BUILDFLAG(IS_OZONE)
+ // TODO(crbug.com/491337216): This is flaky on Wayland because presentation
+ // feedback can be dropped if it arrives before the submission ACK (race
+ // condition in GbmSurfacelessWayland).
+ if (ui::OzonePlatform::RunningOnWaylandForTest()) {
+ GTEST_SKIP()
+ << "Flaky on Wayland due to presentation feedback race condition.";
+ }
+#endif
base::HistogramTester histogram_tester;

CreatePopupForTestQuery();
```

Change information

Commit message:
[OmniboxPopup] Introduce FCP metrics for native and WebUI omnibox popup

This CL adds performance metrics for the Omnibox Popup to enable a fair
comparison between the native view and WebUI implementations.

Key Changes:
- Interaction-to-Paint Latency: Introduces
`TopChromeUI.OmniboxPopup.RequestToFirstContentfulPaint` to measure
the delay from the moment a user triggers the popup to the first
paint of its content.
- Handling Startup Preloading: To provide accurate interaction latency
for WebUIs that are preloaded or initialized early at browse startup,
this CL updates `WebUIContentsPreloadManager` to support explicit
setting of the `request_time`. This ensures that metrics represent
the time from the actual user-initiated show event rather than the
background startup time.
- Consistent Sampling: FCP from native omnibox popup are recorded at
most once per window instance. This aligns with the WebUI's
document-level lifecycle, preventing over-sampling of subsequent
native popup shows in the same session.
- Consolidated Metrics: Focused on First Contentful Paint (FCP) as the
primary indicator of user-perceived performance.

Histograms:
- `TopChromeUI.OmniboxPopup.RequestToFirstContentfulPaint`
Bug: 491337216
Change-Id: I955a2f3bae46cab8e40811b55502bdd0f1fca168
Reviewed-by: Tom Lukaszewicz <tl...@chromium.org>
Commit-Queue: Ming-Ying Chung <my...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1598850}
Files:
  • M chrome/browser/BUILD.gn
  • A chrome/browser/page_load_metrics/observers/top_chrome_webui_metrics_observer.cc
  • A chrome/browser/page_load_metrics/observers/top_chrome_webui_metrics_observer.h
  • A chrome/browser/page_load_metrics/observers/top_chrome_webui_metrics_observer_unittest.cc
  • M chrome/browser/page_load_metrics/page_load_metrics_initialize.cc
  • M chrome/browser/ui/views/omnibox/omnibox_popup_aim_presenter.cc
  • M chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc
  • M chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h
  • M chrome/browser/ui/views/omnibox/omnibox_popup_view_views_browsertest.cc
  • M chrome/browser/ui/views/omnibox/omnibox_popup_view_webui.cc
  • M chrome/browser/ui/webui/top_chrome/webui_contents_preload_manager.cc
  • M chrome/browser/ui/webui/top_chrome/webui_contents_preload_manager.h
  • M chrome/test/BUILD.gn
  • M tools/metrics/histograms/metadata/ui/histograms.xml
Change size: L
Delta: 14 files changed, 337 insertions(+), 5 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Tom Lukaszewicz
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I955a2f3bae46cab8e40811b55502bdd0f1fca168
Gerrit-Change-Number: 7650781
Gerrit-PatchSet: 9
Gerrit-Owner: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Ming-Ying Chung <my...@chromium.org>
Gerrit-Reviewer: Paul Adedeji <paula...@google.com>
Gerrit-Reviewer: Tom Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages