| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! Adding mych@ to review as well.
renderer process for the Reload button WebUI is initialized. This helps
quantify the overhead of using a WebUI architecture for this component.I would say it's more of for figuring out if we're creating the renderer process quickly enough. I think your current metric is recording when the browser requests the renderer process to be created we also want to get the [OnProcessLaunched](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_process_host_impl.cc;l=5809;drc=47a8fcb6f712292969c7d2ef9c8361acd203c5f8) time, which is when the renderer process actually sucessfully gets created and notifies the browser.
timestamp);Ideally we also record this and the other metrics as UKM, so that we can see the progression of renderer process creation requested -> launched -> commit -> paint etc. Let's leave a TODO for this, since UKM recording for topchrome is still not working I think (crbug.com/490810407)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::TimeTicks init_time = rfh->GetProcess()->GetLastInitTime();Is this guarantee to be from Initial WebUI process (isn't it shared with other topchrome webui?
TEST_F(InitialWebUIWindowMetricsManagerTest,
OnReloadButtonRendererProcessCreated) {
// Unlike the "New Window" tests above that provide a start time via
// SetWindowCreationInfo, this test exercises the "Startup" metrics
// (InitialWebUI.Startup.*). These metrics rely on the global application
// start time from startup_metric_utils.
// In some test environments (e.g., ChromeOS unit tests), this global time
// is null by default, causing the metrics service to drop the metrics.
// In such environments, we skip the test.
if (startup_metric_utils::GetBrowser()
.GetApplicationStartTicksForStartup()
.is_null()) {
GTEST_SKIP() << "Startup metrics are not available in this environment.";
}
base::HistogramTester tester;
const base::TimeTicks start_time = base::TimeTicks::Now();
const base::TimeTicks process_time = start_time + kTestLatency;
// Verify that the startup metrics are not recorded before the application
// start time is recorded.
tester.ExpectTotalCount(
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated", 0);
tester.ExpectTotalCount(
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated.Temperature."
"Other",
0);
{
// Create a manager and simulate the process creation event.
InitialWebUIWindowMetricsManager manager(&browser_window_);
manager.OnReloadButtonRendererProcessCreated(process_time);
}
// Verify that the startup metrics are recorded after the application start
// time is recorded.
tester.ExpectTotalCount(
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated", 1);
tester.ExpectTotalCount(
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated.Temperature."
"Other",
1);
{
InitialWebUIWindowMetricsManager manager2(&browser_window_);
manager2.OnReloadButtonRendererProcessCreated(process_time +
base::Milliseconds(100));
}
// Verify singleton behavior: subsequent calls even from a new window nor
// manager should not record the startup metric again.
tester.ExpectTotalCount(
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated", 1);
}
I wouldn't add startup metric tests here as it will be flaky (unless there is a way to ensure every test case resetting the states at the beginning.
A), which is an overhead incurred by the WebUI (WaaP) architecture that doesprefer not to mention WaaP in new changes anymore (just says Initial WebUI or TopChrome WebUI).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
renderer process for the Reload button WebUI is initialized. This helps
quantify the overhead of using a WebUI architecture for this component.I would say it's more of for figuring out if we're creating the renderer process quickly enough. I think your current metric is recording when the browser requests the renderer process to be created we also want to get the [OnProcessLaunched](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_process_host_impl.cc;l=5809;drc=47a8fcb6f712292969c7d2ef9c8361acd203c5f8) time, which is when the renderer process actually sucessfully gets created and notifies the browser.
Thanks, updated the cl description to clarify that this metric measures the time unil the process is requested.
Also, gonna add the metrics to gt OnProcessLaunched in the incoming cls.,
Eriko KurimotoPlease add a bug
Done
base::TimeTicks init_time = rfh->GetProcess()->GetLastInitTime();Is this guarantee to be from Initial WebUI process (isn't it shared with other topchrome webui?
The process is shared with other top-chrome webuis, but `GetLastInitTime` captures the actual process launch timestamp which accurately reflects the renderer creation overhead for the first WebUI component loaded during startup.
The singleton guard in the manager ensures we record this measurement only once per browser session.
And `InitialWebUIPageLoadMetricsObserver` filters for the initial WebUI URL, so it should be ok IIUC.
TEST_F(InitialWebUIWindowMetricsManagerTest,I wouldn't add startup metric tests here as it will be flaky (unless there is a way to ensure every test case resetting the states at the beginning.
Ok, then i just remove the tests.
Ideally we also record this and the other metrics as UKM, so that we can see the progression of renderer process creation requested -> launched -> commit -> paint etc. Let's leave a TODO for this, since UKM recording for topchrome is still not working I think (crbug.com/490810407)
Done
A), which is an overhead incurred by the WebUI (WaaP) architecture that doesprefer not to mention WaaP in new changes anymore (just says Initial WebUI or TopChrome WebUI).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM, thanks!
renderer process for the Reload button WebUI is initialized. This helps
quantify the overhead of using a WebUI architecture for this component.Eriko KurimotoI would say it's more of for figuring out if we're creating the renderer process quickly enough. I think your current metric is recording when the browser requests the renderer process to be created we also want to get the [OnProcessLaunched](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_process_host_impl.cc;l=5809;drc=47a8fcb6f712292969c7d2ef9c8361acd203c5f8) time, which is when the renderer process actually sucessfully gets created and notifies the browser.
Thanks, updated the cl description to clarify that this metric measures the time unil the process is requested.
Also, gonna add the metrics to gt OnProcessLaunched in the incoming cls.,
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
base::TimeTicks init_time = rfh->GetProcess()->GetLastInitTime();Eriko KurimotoIs this guarantee to be from Initial WebUI process (isn't it shared with other topchrome webui?
The process is shared with other top-chrome webuis, but `GetLastInitTime` captures the actual process launch timestamp which accurately reflects the renderer creation overhead for the first WebUI component loaded during startup.
The singleton guard in the manager ensures we record this measurement only once per browser session.
And `InitialWebUIPageLoadMetricsObserver` filters for the initial WebUI URL, so it should be ok IIUC.
sg
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Shishido-san, please take a look at page load metrics changes. Thanks
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Reviewer source(s):
tl...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ui/views/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/page_load_metrics/observers/initial_webui_page_load_metrics_observer.cc
Insertions: 2, Deletions: 0.
The diff is too large to show. Please review the diff.
```
WaaP: Record the renderer process creation time for initial webui
This CL adds a new metric
"InitialWebUI.Startup.ReloadButton.RendererProcessCreated" which
measures the duration from browser startup until the browser initializes
the request for a dedicated renderer process for the Reload button
WebUI.
Captured via RenderProcessHost::GetLastInitTime in the
InitialWebUIPageLoadMetricsObserver::OnCommit method, this metric
quantifies the cost of renderer process startup. This specific
measurement reflects the timing of the browser's request to create the
process, a separate metric for the actual successful process launch
(OnProcessLaunched) may be added in the future to provide a more
granular breakdown of process creation overhead.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |