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

Issue 2644033004: [chromedriver] Prevent GetLog from returning more than 100,000 at a time. (Closed)

Created:
3 years, 11 months ago by samuong
Modified:
3 years, 10 months ago
Reviewers:
stgao, klm
CC:
chromium-reviews, samuong+watch_chromium.org, ahbeng_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[chromedriver] Prevent GetLog from returning more than 100,000 at a time. BUG=681892 Review-Url: https://codereview.chromium.org/2644033004 Cr-Commit-Position: refs/heads/master@{#445429} Committed: https://chromium.googlesource.com/chromium/src/+/ea5734bd3270765de34fc7f37b64759fe1d1c1bd

Patch Set 1 #

Total comments: 9

Patch Set 2 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -2 lines) Patch
M chrome/test/chromedriver/logging.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/chromedriver/logging.cc View 1 2 chunks +20 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/logging_unittest.cc View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
samuong
See bug for context. I tried implementing an end-to-end test but it takes too long ...
3 years, 11 months ago (2017-01-19 19:39:59 UTC) #2
klm
Thanks for a quick turnaround and diligent unit testing! https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc File chrome/test/chromedriver/logging.cc (right): https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc#newcode166 chrome/test/chromedriver/logging.cc:166: ...
3 years, 11 months ago (2017-01-19 20:47:30 UTC) #4
klm
On 2017/01/19 19:39:59, samuong wrote: > See bug for context. I tried implementing an end-to-end ...
3 years, 11 months ago (2017-01-19 20:55:57 UTC) #5
samuong
ListValue is actually already backed by a std::vector (see the definition of base::ListValue::Storage here: https://cs.chromium.org/chromium/src/base/values.h?q=base::ListV&sq=package:chromium&l=391). ...
3 years, 11 months ago (2017-01-19 21:15:37 UTC) #6
samuong
s/10k/100k
3 years, 11 months ago (2017-01-19 21:16:17 UTC) #7
klm
On 2017/01/19 21:15:37, samuong wrote: > ListValue is actually already backed by a std::vector (see ...
3 years, 11 months ago (2017-01-19 21:26:00 UTC) #8
klm
lgtm https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.h File chrome/test/chromedriver/logging.h (right): https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.h#newcode30 chrome/test/chromedriver/logging.h:30: static const size_t kMaxReturnedEntries; On 2017/01/19 21:15:37, samuong ...
3 years, 11 months ago (2017-01-19 21:26:17 UTC) #9
samuong
On 2017/01/19 21:26:00, klm wrote: > On 2017/01/19 21:15:37, samuong wrote: > > ListValue is ...
3 years, 11 months ago (2017-01-19 23:07:34 UTC) #10
klm
On 2017/01/19 23:07:34, samuong wrote: > On 2017/01/19 21:26:00, klm wrote: > > On 2017/01/19 ...
3 years, 11 months ago (2017-01-20 02:22:14 UTC) #11
stgao
Per the discussion in this CL, it lgtm https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc File chrome/test/chromedriver/logging.cc (right): https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc#newcode164 chrome/test/chromedriver/logging.cc:164: for ...
3 years, 11 months ago (2017-01-20 03:40:12 UTC) #12
samuong
https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc File chrome/test/chromedriver/logging.cc (right): https://codereview.chromium.org/2644033004/diff/1/chrome/test/chromedriver/logging.cc#newcode164 chrome/test/chromedriver/logging.cc:164: for (size_t i = 0; i < kMaxReturnedEntries; i++) ...
3 years, 11 months ago (2017-01-23 18:09:24 UTC) #13
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/2644033004/20001
3 years, 11 months ago (2017-01-23 18:09:50 UTC) #16
klm
Sam, just making sure: 1. Have you actually tried my repro example with your fix, ...
3 years, 11 months ago (2017-01-23 18:12:42 UTC) #17
samuong
It works when I run it against www.boston.com. The JSON object for the first call ...
3 years, 11 months ago (2017-01-23 18:44:52 UTC) #19
klm
On 2017/01/23 18:44:52, samuong wrote: > It works when I run it against http://www.boston.com. The ...
3 years, 11 months ago (2017-01-23 18:57:00 UTC) #20
samuong
On 2017/01/23 18:57:00, klm wrote: > On 2017/01/23 18:44:52, samuong wrote: > > It works ...
3 years, 11 months ago (2017-01-23 19:07:23 UTC) #21
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/2644033004/20001
3 years, 11 months ago (2017-01-23 19:08:25 UTC) #23
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/ea5734bd3270765de34fc7f37b64759fe1d1c1bd
3 years, 11 months ago (2017-01-23 19:15:49 UTC) #26
waffles
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2655503002/ by waffles@chromium.org. ...
3 years, 11 months ago (2017-01-23 20:56:28 UTC) #27
klm
3 years, 10 months ago (2017-01-24 20:26:18 UTC) #28
Message was sent while issue was closed.
On 2017/01/19 23:07:34, samuong wrote:
> On 2017/01/19 21:26:00, klm wrote:
> > On 2017/01/19 21:15:37, samuong wrote:
> > > ListValue is actually already backed by a std::vector (see the definition
of
> > > base::ListValue::Storage here:
> > >
> >
>
https://cs.chromium.org/chromium/src/base/values.h?q=base::ListV&sq=package:c...).
> > > I think it's meant to represent a JSON list/array, more than a linked
list.
> > 
> > Yes. And vector is not linked underneath either. I was just saying that if
we
> 1)
> > kept a plain std::vector<base::Value> here instead of a ListValue, 2) added
a
> > bulk append of values to a ListValue – AppendValues(const
> > std::vector<base::Value>& in_values), then this op may speed up by orders of
> > magnitude when it runs for 100K's of entries, and have no tangible
performance
> > change for a low number of entries.
> 
> I think that would work, but unfortunately base::ListValue doesn't have a bulk
> AppendValues method, and I don't think we'd be able to add one, especially if
> its just for a workaround like this.
> 
> An alternative would be to keep a std::vector<base::ListValue>, where each
> ListValue is capped at 100,000 log entries, then we would be fast in all
cases.
> But again, I'm not sure it's worth the complexity; any effort beyond this CL
> should probably go into making net::HttpServer stream its responses.
> 
> Perhaps we should revisit performance only if/when the latency lab finds that
> this is too slow for large traces?

Indeed we do see a very substantial slowdown with this fix, CC'd you on that
bug.

Powered by Google App Engine
This is Rietveld 408576698