Skip to content

Commit 5292e01

Browse files
committed
Disable the lighthouse-specific throttling
1 parent a2e3b83 commit 5292e01

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

internal/devtools_browser.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ def prepare_browser(self, task):
161161
# DevTools-based CPU throttling for desktop and emulated mobile tests
162162
# This throttling should only be applied for lighthouse test runs where
163163
# a custom config path is not specified
164-
if not self.options.android and not self.is_webkit and 'throttle_cpu' in self.job and\
165-
(not task['running_lighthouse'] or not self.job['lighthouse_config']):
164+
if not self.options.android and not self.is_webkit and 'throttle_cpu' in self.job:
166165
logging.debug('DevTools CPU Throttle target: %0.3fx', self.job['throttle_cpu'])
167166
if self.job['throttle_cpu'] > 1:
168167
self.devtools.send_command("Emulation.setCPUThrottlingRate",
@@ -787,15 +786,7 @@ def run_lighthouse_test(self, task):
787786
except Exception:
788787
logging.exception('Error adding custom config for lighthouse test')
789788
else:
790-
if not self.options.android and 'throttle_cpu' in self.job and self.job['throttle_cpu'] > 1:
791-
throttle_amount = min(4.0, self.job['throttle_cpu'])
792-
command.extend(['--throttling-method', 'devtools',
793-
'--throttling.requestLatencyMs', '0',
794-
'--throttling.downloadThroughputKbps', '0',
795-
'--throttling.uploadThroughputKbps', '0',
796-
'--throttling.cpuSlowdownMultiplier', '{:.3f}'.format(throttle_amount)])
797-
else:
798-
command.extend(['--throttling-method', 'provided'])
789+
command.extend(['--throttling-method', 'provided'])
799790
if self.job['keep_lighthouse_trace']:
800791
command.append('--save-assets')
801792
if not self.job['keep_lighthouse_screenshots']:

0 commit comments

Comments
 (0)