Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 2039673002: Track performance of toBlob and its complete timeout delay (Closed)

Created:
4 years, 6 months ago by xidachen
Modified:
4 years, 5 months ago
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, asvitkine+watch_chromium.org, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track performance of toBlob and its complete timeout delay This CL does two things: 1. Track the performance of a toBlob API call. Because toBlob has a call back, so we put a timer in the CanvasAsyncToBlob class. 2. Track how often the complete timeout delay happens in toBlob calls. BUG=612585, 608815 Committed: https://crrev.com/8c59e014125ad442b32c21b1724add603b489cc2 Cr-Commit-Position: refs/heads/master@{#403362}

Patch Set 1 #

Patch Set 2 : change to thread safe static local histogram #

Total comments: 2

Patch Set 3 : address comments #

Patch Set 4 : clean up code #

Patch Set 5 : add timing for start&complete timeout #

Patch Set 6 : add to histograms #

Patch Set 7 : better categorization #

Total comments: 11

Patch Set 8 : address comments #

Patch Set 9 : minor clean up #

Total comments: 3

Patch Set 10 : need to see diff, DO NOT COMMIT this PS #

Patch Set 11 : need to see diff #

Patch Set 12 : rebase #

Total comments: 10

Patch Set 13 : address comments #

Total comments: 4

Patch Set 14 : correctly accumulate idle time slices #

Total comments: 10

Patch Set 15 : address comments #

Total comments: 4

Patch Set 16 : address comments #

Total comments: 2

Patch Set 17 : add a NotUsed enum #

Total comments: 17

Patch Set 18 : more comments #

Total comments: 5

Patch Set 19 : changed description #

Total comments: 2

Patch Set 20 : nits #

Patch Set 21 : fix compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -9 lines) Patch
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 10 chunks +41 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +68 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (9 generated)
xidachen
xlai@: could you please make sure that I place the enum histogram and the timer ...
4 years, 6 months ago (2016-06-06 14:38:57 UTC) #2
Justin Novosad
https://codereview.chromium.org/2039673002/diff/20001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/20001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode294 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:294: recordElapsedTime(); The failure case should not be recording to ...
4 years, 6 months ago (2016-06-06 15:16:03 UTC) #3
xidachen
PTAL Right now we are measuring 3 things: 1. Duration of a toBlob API call. ...
4 years, 6 months ago (2016-06-07 13:18:51 UTC) #4
xlai (Olivia)
Hi Xida, as a summary, for the three things that you're measuring: 1. Duration of ...
4 years, 6 months ago (2016-06-07 16:08:14 UTC) #5
xidachen
xlai@: I believe I have addressed all comments. PTAL https://codereview.chromium.org/2039673002/diff/120001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/120001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode98 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:98: ...
4 years, 6 months ago (2016-06-07 20:46:29 UTC) #6
Justin Novosad
https://codereview.chromium.org/2039673002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2039673002/diff/120001/tools/metrics/histograms/histograms.xml#newcode3482 tools/metrics/histograms/histograms.xml:3482: + <owner>junov@chromium.org</owner> You can put more that one owner, ...
4 years, 6 months ago (2016-06-07 21:43:44 UTC) #7
Ilya Sherman
I've been hanging back while you figure out exactly what histograms you'd like to log, ...
4 years, 6 months ago (2016-06-08 04:14:35 UTC) #8
xidachen
PTAL. So we are recording a few things: 1. The time spent on an entire ...
4 years, 6 months ago (2016-06-13 19:14:15 UTC) #9
xlai (Olivia)
Besides the in-line comments below, I have two high-level comments: 1. I don't think you ...
4 years, 6 months ago (2016-06-13 20:15:07 UTC) #10
Justin Novosad
https://codereview.chromium.org/2039673002/diff/220001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/220001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode206 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:206: DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, toBlobPNGIdleEncodeCounter, new CustomCountHistogram("Blink.Canvas.ToBlob.IdleEncodeDuration.PNG", 0, 10000000, 50)); This stat ...
4 years, 6 months ago (2016-06-13 21:21:35 UTC) #11
xidachen
https://codereview.chromium.org/2039673002/diff/220001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/220001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode207 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:207: toBlobPNGIdleEncodeCounter.count(elapsedTime * 1000000.0); On 2016/06/13 21:21:35, Justin Novosad wrote: ...
4 years, 6 months ago (2016-06-22 14:01:26 UTC) #12
Justin Novosad
https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode214 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:214: m_elapsedTime += (WTF::monotonicallyIncreasingTime() - m_initiateStartTime); At each Idle slice, ...
4 years, 6 months ago (2016-06-22 14:38:58 UTC) #13
xidachen
https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode214 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:214: m_elapsedTime += (WTF::monotonicallyIncreasingTime() - m_initiateStartTime); On 2016/06/22 14:38:57, Justin ...
4 years, 6 months ago (2016-06-22 15:40:41 UTC) #14
Justin Novosad
On 2016/06/22 15:40:41, xidachen wrote: > https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > (right): > > https://codereview.chromium.org/2039673002/diff/240001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode214 ...
4 years, 6 months ago (2016-06-22 20:15:43 UTC) #15
xlai (Olivia)
https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode213 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:213: toBlobPNGIdleEncodeCounter.count(m_elapsedTime * 1000000.0); I think there is a logic ...
4 years, 5 months ago (2016-06-23 17:07:37 UTC) #16
xidachen
https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode213 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:213: toBlobPNGIdleEncodeCounter.count(m_elapsedTime * 1000000.0); On 2016/06/23 17:07:37, xlai (Olivia) wrote: ...
4 years, 5 months ago (2016-06-24 11:17:52 UTC) #17
xlai (Olivia)
https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode196 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:196: double startTime = WTF::monotonicallyIncreasingTime(); put this back. https://codereview.chromium.org/2039673002/diff/260001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode201 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:201: ...
4 years, 5 months ago (2016-06-24 14:56:09 UTC) #18
xidachen
https://codereview.chromium.org/2039673002/diff/280001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/280001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode199 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:199: double startTime = WTF::monotonicallyIncreasingTime(); On 2016/06/24 14:56:09, xlai (Olivia) ...
4 years, 5 months ago (2016-06-24 15:27:55 UTC) #19
xlai (Olivia)
On 2016/06/24 15:27:55, xidachen wrote: > https://codereview.chromium.org/2039673002/diff/280001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp > (right): > > https://codereview.chromium.org/2039673002/diff/280001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode199 ...
4 years, 5 months ago (2016-06-24 15:37:50 UTC) #20
xidachen
+rkaplow: could you take a look at the histogram changes?
4 years, 5 months ago (2016-06-27 18:12:40 UTC) #22
rkaplow
https://codereview.chromium.org/2039673002/diff/300001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/300001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode283 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:283: DEFINE_STATIC_LOCAL(EnumerationHistogram, toBlobIdleTaskStatus, ("Blink.Canvas.ToBlob.IdleTaskStatus", IdleTaskNotSupported)); this should be a MAX ...
4 years, 5 months ago (2016-06-28 15:14:04 UTC) #23
xidachen
https://codereview.chromium.org/2039673002/diff/300001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp (right): https://codereview.chromium.org/2039673002/diff/300001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp#newcode283 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp:283: DEFINE_STATIC_LOCAL(EnumerationHistogram, toBlobIdleTaskStatus, ("Blink.Canvas.ToBlob.IdleTaskStatus", IdleTaskNotSupported)); On 2016/06/28 15:14:04, rkaplow wrote: ...
4 years, 5 months ago (2016-06-28 15:57:48 UTC) #24
xidachen
histogram owners: gentle ping.
4 years, 5 months ago (2016-06-29 20:56:45 UTC) #25
Ilya Sherman
https://codereview.chromium.org/2039673002/diff/320001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h (right): https://codereview.chromium.org/2039673002/diff/320001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h#newcode30 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h:30: // enum used in histogram nit: Suggested phrasing: "This ...
4 years, 5 months ago (2016-06-29 22:01:03 UTC) #26
xidachen
isherman@: all comments are addressed. https://codereview.chromium.org/2039673002/diff/320001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h File third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h (right): https://codereview.chromium.org/2039673002/diff/320001/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h#newcode30 third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h:30: // enum used in ...
4 years, 5 months ago (2016-06-30 01:53:38 UTC) #27
Ilya Sherman
Metrics LGTM % a clarification request, which I think would be great to ask a ...
4 years, 5 months ago (2016-06-30 07:35:52 UTC) #28
xlai (Olivia)
I put a much lengthy description here on the two metrics that cause confusion. Not ...
4 years, 5 months ago (2016-06-30 14:42:31 UTC) #29
xidachen
https://codereview.chromium.org/2039673002/diff/360001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2039673002/diff/360001/tools/metrics/histograms/histograms.xml#newcode3591 tools/metrics/histograms/histograms.xml:3591: + IdleTaskCompleteTimeoutDelay in canvas.toBlob. histogram owners: could you please ...
4 years, 5 months ago (2016-06-30 15:25:05 UTC) #30
Ilya Sherman
Thanks! The suggested descriptions are much clearer, and LGTM % a few grammatical nits (inline). ...
4 years, 5 months ago (2016-06-30 17:22:37 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2039673002/380001
4 years, 5 months ago (2016-06-30 18:01:48 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/227801)
4 years, 5 months ago (2016-06-30 18:10:17 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2039673002/400001
4 years, 5 months ago (2016-06-30 19:04:46 UTC) #37
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/248692)
4 years, 5 months ago (2016-06-30 20:03:12 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2039673002/400001
4 years, 5 months ago (2016-06-30 22:33:38 UTC) #42
commit-bot: I haz the power
Committed patchset #21 (id:400001)
4 years, 5 months ago (2016-07-01 00:17:20 UTC) #43
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-01 00:17:36 UTC) #44
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 00:20:57 UTC) #46
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/8c59e014125ad442b32c21b1724add603b489cc2
Cr-Commit-Position: refs/heads/master@{#403362}

Powered by Google App Engine
This is Rietveld 408576698