New issue
Advanced search Search tips

Issue 783960 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Count the usage of passing object to performance.measure()

Project Member Reported by maxlg@chromium.org, Nov 10 2017

Issue description

Before we extend the custom user timing from performance.measure(), we want to count the usages of passing an object to performance.measure(), so that we will not break the user cases.
 
Components: Blink>PerformanceAPIs
Owner: maxlg@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by maxlg@google.com, Nov 14 2017

We want to count the histogram of possible strings of A, B in Performance.measure(name, A, B).

We expect to see "[Object, Object]" and the following strings:
unloadEventEnd,
domInteractive,
domContentLoadedEventStart,
domContentLoadedEventEnd,
domComplete,
loadEventStart,
loadEventEnd,

in addition to user-defined markers.

Comment 3 by maxlg@google.com, Nov 15 2017

In addition to histogram, we also want a use counter, counting how much proportion of sites are passing an object.

Comment 4 by maxlg@google.com, Nov 15 2017

The typical usage seems to be just adding a line: UseCounter::Count(source, WebFeature::kMixedContentPresent); But it needs the frame/document as the first parameter, which isn't provided in PerformanceBase.measure(), but Performance provide the frame information.

Do we want to move the measure() to Performance? Or is there other lighter weight implementation idea?

Comment 5 by maxlg@google.com, Nov 15 2017

Tim put an idea about having an abstract method in PerformanceBase, and we implement this method in PerformanceWorker, Performance and PerformanceTest. 

It sounds like a workable plan.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9587bf63874242702ca9d50355ad61b28d9ab309

commit 9587bf63874242702ca9d50355ad61b28d9ab309
Author: Liquan (Max) Gu <maxlg@chromium.org>
Date: Sat Nov 18 04:21:52 2017

[CustomUserTiming] Add histogram to count parameters of Performance-Measure

Before we extend the custom user timing from performance.measure(), we want to
count the usages of start-mark/end-mark being an object in
performance.measure(), and identify references to navigationTiming strings, to
predict how much the custom user timing will impact the current user cases.

Bug:  783960 
Change-Id: Id4f5cf5a6dc05eeb150c0a9cdc4f13a43dbb820c
Reviewed-on: https://chromium-review.googlesource.com/769932
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Liquan Gu <maxlg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517699}
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/third_party/WebKit/Source/core/timing/PerformanceBase.h
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/third_party/WebKit/Source/core/timing/PerformanceTest.cpp
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/9587bf63874242702ca9d50355ad61b28d9ab309/tools/metrics/histograms/histograms.xml

Comment 7 by maxlg@google.com, Nov 23 2017

Status: Fixed (was: Assigned)
UMA has started to collected data. The bug is fixed.

Sign in to add a comment