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

Issue 2384723002: Worker: Shorten running time of DedicatedWorkerTests (Closed)

Created:
4 years, 2 months ago by nhiroki
Modified:
4 years, 2 months ago
Reviewers:
falken
CC:
chromium-reviews, shimazu+worker_chromium.org, falken, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Worker: Shorten running time of DedicatedWorkerTests DedicatedWorkerTests are very slow compared to other tests. According to the report (https://crbug.com/650346), these take 20% of the running time of webkit_unit_tests. This CL saves the running time by shortening delays for postDelayedTask(), setInterval() etc used in the tests. Before this CL (Linux Debug Build): [1/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_NoActivity/0 (197 ms) [2/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeout/0 (194 ms) [3/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetInterval/0 (195 ms) [4/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeoutOnMessageEvent/0 (1202 ms) [5/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetIntervalOnMessageEvent/0 (1409 ms) [6/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_NoActivity/0 (155 ms) [7/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeout/0 (169 ms) [8/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetInterval/0 (160 ms) [9/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeoutOnMessageEvent/0 (1187 ms) [10/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetIntervalOnMessageEvent/0 (1374 ms) After this CL (Linux Debug Build): [1/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_NoActivity/0 (116 ms) [2/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeout/0 (105 ms) [3/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetInterval/0 (109 ms) [4/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeoutOnMessageEvent/0 (120 ms) [5/10] MainThreadHeap/DedicatedWorkerTest.PendingActivity_SetIntervalOnMessageEvent/0 (139 ms) [6/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_NoActivity/0 (68 ms) [7/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeout/0 (74 ms) [8/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetInterval/0 (77 ms) [9/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetTimeoutOnMessageEvent/0 (94 ms) [10/10] PerThreadHeap/DedicatedWorkerTest.PendingActivity_SetIntervalOnMessageEvent/0 (104 ms) BUG=650346 Committed: https://crrev.com/4fc0c9e997c07fafa8089520db5286b4f0f22817 Cr-Commit-Position: refs/heads/master@{#423789}

Patch Set 1 #

Total comments: 4

Patch Set 2 : rebase #

Patch Set 3 : shorten the delays more #

Total comments: 8

Patch Set 4 : revise comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -10 lines) Patch
M third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp View 1 2 3 7 chunks +27 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 23 (13 generated)
nhiroki
PTAL, thanks!
4 years, 2 months ago (2016-09-30 10:37:46 UTC) #4
falken
I normally am opposed to setTimeout/Interval in tests but I guess it's needed for this ...
4 years, 2 months ago (2016-10-03 01:10:47 UTC) #7
nhiroki
On 2016/10/03 01:10:47, falken wrote: > I normally am opposed to setTimeout/Interval in tests but ...
4 years, 2 months ago (2016-10-04 08:33:08 UTC) #10
nhiroki
Thank you! Updated. https://codereview.chromium.org/2384723002/diff/1/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp File third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp (right): https://codereview.chromium.org/2384723002/diff/1/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp#newcode45 third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp:45: workerObjectProxy().m_maxIntervalInSec = 0.02; On 2016/10/03 01:10:46, ...
4 years, 2 months ago (2016-10-04 08:33:42 UTC) #11
falken
Thanks for the explanations. Some more nitty comments. https://codereview.chromium.org/2384723002/diff/40001/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp File third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp (right): https://codereview.chromium.org/2384723002/diff/40001/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp#newcode25 third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp:25: const ...
4 years, 2 months ago (2016-10-05 01:46:01 UTC) #15
nhiroki
Thank you. Updated. https://codereview.chromium.org/2384723002/diff/40001/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp File third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp (right): https://codereview.chromium.org/2384723002/diff/40001/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp#newcode25 third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp:25: const double kMaxIntervalInSec = 0.02; On ...
4 years, 2 months ago (2016-10-05 03:57:18 UTC) #16
falken
lgtm
4 years, 2 months ago (2016-10-07 01:24:13 UTC) #17
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/2384723002/60001
4 years, 2 months ago (2016-10-07 01:24:50 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-07 02:55:43 UTC) #21
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 02:56:59 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4fc0c9e997c07fafa8089520db5286b4f0f22817
Cr-Commit-Position: refs/heads/master@{#423789}

Powered by Google App Engine
This is Rietveld 408576698