Commit 3bd79894 authored by Tom Lukaszewicz's avatar Tom Lukaszewicz Committed by Josip Sokcevic

Tab Search: Add API performance metric

Matching src-public CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2432589

Bug: 1099917
Change-Id: I19496be097ef9714e0e46872ff6966e54e442086
Reviewed-on: https://chrome-internal-review.googlesource.com/c/chrome/browser/resources/tab_search/+/3291206Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819623}
parent d58b9ebb
...@@ -148,7 +148,12 @@ export class TabSearchAppElement extends PolymerElement { ...@@ -148,7 +148,12 @@ export class TabSearchAppElement extends PolymerElement {
/** @private */ /** @private */
updateTabs_() { updateTabs_() {
const getTabsStartTimestamp = Date.now();
this.apiProxy_.getProfileTabs().then(({profileTabs}) => { this.apiProxy_.getProfileTabs().then(({profileTabs}) => {
chrome.metricsPrivate.recordTime(
'Tabs.TabSearch.WebUI.TabListDataReceived',
Math.round(Date.now() - getTabsStartTimestamp));
// Prior to the first load |this.openTabs_| has not been set. Record the // Prior to the first load |this.openTabs_| has not been set. Record the
// time it takes for the initial list of tabs to render. // time it takes for the initial list of tabs to render.
if (!this.openTabs_) { if (!this.openTabs_) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment