|
|
Created:
7 years, 4 months ago by Sami Modified:
7 years, 4 months ago Reviewers:
Mark P CC:
chromium-reviews, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionAdd canvas context type histogram
Add histogram for tracking which names are being used to create canvas
rendering contexts.
BUG=112928
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215952
Patch Set 1 #
Total comments: 2
Patch Set 2 : Improve description. #Patch Set 3 : Improve description. #
Total comments: 1
Patch Set 4 : Rebased. #
Messages
Total messages: 11 (0 generated)
https://codereview.chromium.org/21835003/diff/1/tools/metrics/histograms/hist... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/21835003/diff/1/tools/metrics/histograms/hist... tools/metrics/histograms/histograms.xml:1090: The context type passed into the getContext() canvas function. Used to track This sounds icky. Most histograms are emitted on a clearly defined basis: on startup, on profile load, on navigation, when the user does X, when this network event occurs, etc. It's not obvious to me what causes a function like getContext() to be called. I can easily imagine another programmer to add another call to a function named getContext() rather than, say, pass the context down through six layers of function parameters. I can imagine if you have multiple calls in close proximity that some may be optimized away b by the compiler. Can you please make the histogram emit at a more definitive time? (or argue all my worries are inappropriate)
https://codereview.chromium.org/21835003/diff/1/tools/metrics/histograms/hist... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/21835003/diff/1/tools/metrics/histograms/hist... tools/metrics/histograms/histograms.xml:1090: The context type passed into the getContext() canvas function. Used to track On 2013/08/02 14:46:14, Mark P wrote: > This sounds icky. Most histograms are emitted on a clearly defined basis: on > startup, on profile load, on navigation, when the user does X, when this network > event occurs, etc. It's not obvious to me what causes a function like > getContext() to be called. I can easily imagine another programmer to add > another call to a function named getContext() rather than, say, pass the context > down through six layers of function parameters. I can imagine if you have > multiple calls in close proximity that some may be optimized away b by the > compiler. > > Can you please make the histogram emit at a more definitive time? (or argue all > my worries are inappropriate) You're right, my first stab of the description wasn't very accurate. The object here is to record which context type name is used to create each canvas rendering context. For example, for a 2D rendering context we'll record the name "2d", while a 3D context can use a set of aliases like "webkit-3d", "webgl" and "experimental-webgl". This happens at most once per <canvas> element on the page. Here's the blink-side patch that records the data if it helps: https://codereview.chromium.org/21861002/
lgtm https://codereview.chromium.org/21835003/diff/8001/tools/metrics/histograms/h... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/21835003/diff/8001/tools/metrics/histograms/h... tools/metrics/histograms/histograms.xml:1090: Records the context type names used to create canvas rendering contexts. for my edification (don't revise the comment): Is this recorded (in effect) once only when the canvas is created? Does scrolling/resizing/etc. cause this to be emitted?
On 2013/08/02 15:40:58, Mark P wrote: > lgtm > > https://codereview.chromium.org/21835003/diff/8001/tools/metrics/histograms/h... > File tools/metrics/histograms/histograms.xml (right): > > https://codereview.chromium.org/21835003/diff/8001/tools/metrics/histograms/h... > tools/metrics/histograms/histograms.xml:1090: Records the context type names > used to create canvas rendering contexts. > for my edification (don't revise the comment): > Is this recorded (in effect) once only when the canvas is created? Does > scrolling/resizing/etc. cause this to be emitted? Thanks. Yes, this only happens when the canvas rendering context is created for the first time. Since context creation is generally a heavy-weight operation, sites aren't expected to do it frequently. Resizing the canvas or scrolling have no effect on the context and thus won't cause histogram events.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/21835003/8001
Failed to apply patch for tools/metrics/histograms/histograms.xml: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file tools/metrics/histograms/histograms.xml Hunk #2 succeeded at 15760 (offset 207 lines). Hunk #3 succeeded at 21135 with fuzz 1 (offset 296 lines). Hunk #4 FAILED at 20853. 1 out of 4 hunks FAILED -- saving rejects to file tools/metrics/histograms/histograms.xml.rej Patch: tools/metrics/histograms/histograms.xml Index: tools/metrics/histograms/histograms.xml diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index fecd8a04c4665a07428dc687595e45e57840bd57..884e3c60c3ee59fbff98f723a68ba9fdcea617b0 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -1085,6 +1085,12 @@ other types of suffix sets. </summary> </histogram> +<histogram name="Canvas.ContextType" enum="CanvasContextType"> + <summary> + Records the context type names used to create canvas rendering contexts. + </summary> +</histogram> + <histogram name="Cellular.ActivationFailure"> <summary> The count of cellular device activation failures (Chrome OS). @@ -15547,6 +15553,13 @@ other types of suffix sets. <int value="1" label="Wiped out"/> </enum> +<enum name="CanvasContextType" type="int"> + <int value="0" label="2d"/> + <int value="1" label="webkit-3d"/> + <int value="2" label="experimental-webgl"/> + <int value="3" label="webgl"/> +</enum> + <enum name="ChannelLayout" type="int"> <int value="0" label="CHANNEL_LAYOUT_NONE"/> <int value="1" label="CHANNEL_LAYOUT_UNSUPPORTED"/> @@ -20826,6 +20839,12 @@ other types of suffix sets. <int value="2" label="Dismiss"/> </enum> +<enum name="SimpleCache.FileDescriptorLimitStatus" type="int"> + <int value="0" label="Unsupported"/> + <int value="1" label="Supported but failed"/> + <int value="2" label="Succeeded"/> +</enum> + <enum name="SimpleCacheHeaderSizeChange" type="int"> <int value="0" label="Written for the first time"/> <int value="1" label="Rewritten with same size"/> @@ -20834,12 +20853,6 @@ other types of suffix sets. <int value="4" label="Unexpected header stream write"/> </enum> -<enum name="SimpleCache.FileDescriptorLimitStatus" type="int"> - <int value="0" label="Unsupported"/> - <int value="1" label="Supported but failed"/> - <int value="2" label="Succeeded"/> -</enum> - <enum name="SimpleCacheIndexInitializeMethod" type="int"> <int value="0" label="Directory Scan"/> <int value="1" label="Index File"/>
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/21835003/16001
Retried try job too often on mac_rel for step(s) remoting_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/21835003/16001
Message was sent while issue was closed.
Change committed as 215952 |