summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-04-30 10:54:49 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-30 17:55:18 +0000
commit29b9c73fbe1d65ec86df84eeb07e8ebb4df0c5ca (patch)
treefe02ed08d83fc587c1e0389b1b74398b1f36822f
parent8b7ffd9407a83e90848b430b36b6856c4eec060d (diff)
downloadchromium_src-29b9c73fbe1d65ec86df84eeb07e8ebb4df0c5ca.zip
chromium_src-29b9c73fbe1d65ec86df84eeb07e8ebb4df0c5ca.tar.gz
chromium_src-29b9c73fbe1d65ec86df84eeb07e8ebb4df0c5ca.tar.bz2
Don't let the cookie profile extender over work WebPageReplay.
If too many requests are sent to WebPageReplay over a duration of 4 minutes (maximum segment lifetime), then it may exhaust the socket pool. Artificially limit the rate at which the cookie profile extender sends requests to the WebPageReplay by not allowing more than 5 simultaneous tabs loading resources. This isn't very precise and may be adjusted in the future. BUG= Review URL: https://codereview.chromium.org/1103583004 Cr-Commit-Position: refs/heads/master@{#327735}
-rw-r--r--tools/perf/profile_creators/cookie_profile_extender.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/profile_creators/cookie_profile_extender.py b/tools/perf/profile_creators/cookie_profile_extender.py
index cb53363..615e66e 100644
--- a/tools/perf/profile_creators/cookie_profile_extender.py
+++ b/tools/perf/profile_creators/cookie_profile_extender.py
@@ -24,6 +24,13 @@ class CookieProfileExtender(
# javascript. There's not much to be done about the former, and having one
# tab per logical core appears close to optimum for the latter.
maximum_batch_size = multiprocessing.cpu_count()
+
+ # Web page replay cannot handle too many requests over a duration of 4
+ # minutes (maximum segment lifetime), as it may exhaust the socket pool.
+ # Artificially limit the rate to no more than 5 simultaneous tab loads.
+ if not finder_options.use_live_sites:
+ maximum_batch_size = min(5, maximum_batch_size)
+
super(CookieProfileExtender, self).__init__(
finder_options, maximum_batch_size)