Need to migrate kEnableNetBenchmarking (enable-net-benchmarking) to network service |
||||||||||||||
Issue descriptionI am doing an audit of URLRequestContextGetter's users as a part of Issue 837333 , and noticed this enable-net-benchmarking flag. Is it still being used? https://cs.chromium.org/chromium/src/chrome/browser/chrome_content_browser_client.cc?rcl=31e590f90804160b9e90575452006a3ded7e3bcb&l=3217 if (NetBenchmarking::CheckBenchmarkingEnabled()) { Profile* profile = Profile::FromBrowserContext(render_process_host->GetBrowserContext()); net::URLRequestContextGetter* context = render_process_host->GetStoragePartition()->GetURLRequestContext(); registry->AddInterface(base::Bind(&NetBenchmarking::Create, profile, base::RetainedRef(context))); }
,
May 2 2018
,
May 2 2018
Telemetry uses it on all benchmark: https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome/chrome_startup_args.py?rcl=86d3e79d8882670b4111b71eadf41072f98be34b&l=39 I am not sure what this is for? (probably was added way before I joined the team)
,
May 2 2018
,
May 2 2018
Ok. I will send out an email to chromium-dev@ to ask.
,
May 2 2018
davidben@ dug up the initial commit and crbug. https://codereview.chromium.org/119191 https://bugs.chromium.org/p/chromium/issues/detail?id=6754 This is used to inject chrome.benchmarking APIs to clear various caches and close connections. https://cs.chromium.org/chromium/src/tools/chrome_proxy/webdriver/common.py?q=chrome%5C.benchmarking&sq=package:chromium&l=381&dr=C https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py?q=chrome%5C.benchmarking&sq=package:chromium&l=312&dr=C We will need to migrate this to using Network Service's APIs.
,
May 9 2018
,
May 14 2018
Helen, we may be able to deprecate the chrome.benchmarking APIs as another solution. I don't think they are heavily used.
,
May 14 2018
Re#8: Can we deprecate chrome.benchmarking? My understanding is that Telemetry benchmark stories need to clear various caches between runs.
,
May 14 2018
#8 we also use chrome.benchmarking API for simulate gesture in Telemetry. I think it's good to deprecate this but the effort gonna take multiple quarters
,
May 14 2018
#10 I just meant the net benchmarking hooks. It looks like --enable-net-benchmarking just gives 4 methods: 1. Clear cache 2. Clear host resolver cache 3. Clear predictor cache 4. Close connections These are implemented in https://cs.chromium.org/chromium/src/chrome/browser/net_benchmarking.h
,
May 14 2018
Oops just noticed that telemetry depends on some of these methods. Just FYI that the clearPredictorCache method: 1. Kinda unsafely stores a Profile* on the IO thread and post tasks to the UI thread to deref it. Could it cause use after free? 2. alexilin is migrating predictor to a different service, so that method needs to change semantics and clear a different DB.
,
May 15 2018
,
May 18 2018
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2 commit 4909ec849b19c4a89caa4413e3e7cb9de9a8fab2 Author: Alexandr Ilin <alexilin@chromium.org> Date: Wed Jun 06 10:22:48 2018 predictors: Update the NetBenchmarking to clear the LoadingPredictor DB NetBenchmarking provides a method to clear network predictor cache. The predictor is migrating to a different service, so this method should clear a different DB. This CL also removes unsafe storing a Profile* on the IO thread. The NetBenchmarking stores weak pointers to predictors instead. Bug: 838949 , 623967 Change-Id: Ie73d57555237aea4ebb7be1a324151e5ea190b68 Reviewed-on: https://chromium-review.googlesource.com/1085450 Commit-Queue: Alexandr Ilin <alexilin@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#564846} [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/net/predictor.h [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/net_benchmarking.cc [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/net_benchmarking.h [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/predictors/resource_prefetch_predictor.cc [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/predictors/resource_prefetch_predictor.h [modify] https://crrev.com/4909ec849b19c4a89caa4413e3e7cb9de9a8fab2/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
,
Jun 7 2018
,
Jun 12 2018
,
Jun 12 2018
,
Jun 25 2018
,
Jul 18
,
Jul 26
I think this is fixed by rmcelrath@ in https://chromium-review.googlesource.com/c/chromium/src/+/1135715 |
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by xunji...@chromium.org
, May 2 2018