Skip to content

Commit

Permalink
Use 4G desktop config when dtshaper is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeenan committed Nov 21, 2023
1 parent 704ec25 commit f8dff57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/devtools_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,12 @@ def run_lighthouse_test(self, task):
else:
cpu_throttle = '{:.3f}'.format(self.job['throttle_cpu']) if 'throttle_cpu' in self.job else '1'
if self.job['dtShaper']:
command.extend(['--throttling-method', 'devtools', '--throttling.requestLatencyMs', '150', '--throttling.downloadThroughputKbps', '1600', '--throttling.uploadThroughputKbps', '768', '--throttling.cpuSlowdownMultiplier', cpu_throttle])
if self.options.android or ('mobile' in self.job and self.job['mobile']):
# 1.6Mbps down, 750Kbps up, 150ms RTT
command.extend(['--throttling-method', 'devtools', '--throttling.requestLatencyMs', '150', '--throttling.downloadThroughputKbps', '1600', '--throttling.uploadThroughputKbps', '768', '--throttling.cpuSlowdownMultiplier', cpu_throttle])
else:
# 10Mbps, 40ms RTT
command.extend(['--throttling-method', 'devtools', '--throttling.requestLatencyMs', '40', '--throttling.downloadThroughputKbps', '1024', '--throttling.uploadThroughputKbps', '1024', '--throttling.cpuSlowdownMultiplier', cpu_throttle])
elif 'throttle_cpu_requested' in self.job and self.job['throttle_cpu_requested'] > 1:
command.extend(['--throttling-method', 'devtools', '--throttling.requestLatencyMs', '0', '--throttling.downloadThroughputKbps', '0', '--throttling.uploadThroughputKbps', '0', '--throttling.cpuSlowdownMultiplier', cpu_throttle])
else:
Expand Down

0 comments on commit f8dff57

Please sign in to comment.