Bug 1961189 - Add support for running upload/download tests with HTTP/2, r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245924
This commit is contained in:
committed by
kjang@mozilla.com
parent
380eee1d6b
commit
a7e2dadd9c
@@ -970,6 +970,8 @@ browsertime-network-bench:
|
||||
subtests:
|
||||
- [h3-upload, h3-up]
|
||||
- [h3-download, h3-down]
|
||||
- [h2-upload, h2-up]
|
||||
- [h2-download, h2-down]
|
||||
network-conditions:
|
||||
by-subtest:
|
||||
h3-upload:
|
||||
@@ -984,6 +986,18 @@ browsertime-network-bench:
|
||||
- [300M_80ms, "0"]
|
||||
- [10M_40ms, "0"]
|
||||
- [100M_40ms, "0"]
|
||||
h2-upload:
|
||||
- [1M_400ms, "0"]
|
||||
- [300M_40ms, "0"]
|
||||
- [300M_80ms, "0"]
|
||||
- [10M_40ms, "0"]
|
||||
- [100M_40ms, "0"]
|
||||
h2-download:
|
||||
- [1M_400ms, "0"]
|
||||
- [300M_40ms, "0"]
|
||||
- [300M_80ms, "0"]
|
||||
- [10M_40ms, "0"]
|
||||
- [100M_40ms, "0"]
|
||||
default: []
|
||||
description: Raptor (browsertime) networking download/upload performance test
|
||||
max-run-time: 15000
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,7 @@ module.exports = logTest(
|
||||
}
|
||||
});
|
||||
|
||||
if (browserName === "firefox") {
|
||||
if (browserName === "firefox" && protocol === "h3") {
|
||||
const statsScript = `
|
||||
const gDashboard = Cc["@mozilla.org/network/dashboard;1"].getService(
|
||||
Ci.nsIDashboard
|
||||
|
||||
@@ -184,6 +184,7 @@ class NetworkBench(BasePythonSupport):
|
||||
],
|
||||
},
|
||||
]
|
||||
protocols = ["h3"] if self.http_version == "h3" else ["h1", "h2"]
|
||||
caddyfile_content = {
|
||||
"admin": {"disabled": True},
|
||||
"apps": {
|
||||
@@ -191,7 +192,7 @@ class NetworkBench(BasePythonSupport):
|
||||
"servers": {
|
||||
"server1": {
|
||||
"listen": [port_str],
|
||||
"protocols": ["h3"],
|
||||
"protocols": protocols,
|
||||
"routes": routes,
|
||||
"tls_connection_policies": [
|
||||
{"certificate_selection": {"any_tag": ["cert1"]}}
|
||||
@@ -601,8 +602,15 @@ class NetworkBench(BasePythonSupport):
|
||||
f"--chrome.args=--origin-to-force-quic-on=localhost:{self.caddy_port}",
|
||||
f"--chrome.args=--ignore-certificate-errors-spki-list={spki}",
|
||||
]
|
||||
else:
|
||||
elif self.http_version == "h2":
|
||||
self.caddy_port = self.find_free_port(socket.SOCK_STREAM)
|
||||
if self._is_chrome:
|
||||
spki = "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8="
|
||||
cmd += [
|
||||
f"--chrome.args=--ignore-certificate-errors-spki-list={spki}",
|
||||
]
|
||||
else:
|
||||
raise Exception("Unsupported HTTP version")
|
||||
|
||||
self.get_network_conditions(cmd)
|
||||
temp_file_path = None
|
||||
|
||||
@@ -254,6 +254,8 @@ suites:
|
||||
trr-w-next: "Tests DNS lookup time on a NextDNS TRR server, with the TRR connection warmed up."
|
||||
upload: "Measures HTTP/2 file upload throughput with a remote server"
|
||||
upload-h3: "Measures HTTP/3 file upload throughput with a remote server"
|
||||
h2-upload: "Measures HTTP/2 file upload throughput with a local server"
|
||||
h2-download: "Measures HTTP/2 download throughput with a local server"
|
||||
h3-upload: "Measures HTTP/3 file upload throughput with a local server"
|
||||
h3-download: "Measures HTTP/3 download throughput with a local server"
|
||||
throttled: "Pageload test using a throttled network environment"
|
||||
|
||||
@@ -28,3 +28,13 @@ test_script = "network_bench.js"
|
||||
["h3-download"]
|
||||
browsertime_args = "--browsertime.test_type=h3_download --browsertime.iterations=10 --firefox.preference=network.http.http3.enable:true"
|
||||
test_script = "network_bench.js"
|
||||
|
||||
# http/2
|
||||
|
||||
["h2-upload"]
|
||||
browsertime_args = "--browsertime.test_type=h2_upload --browsertime.iterations=10 --firefox.preference=network.http.http3.enable:false"
|
||||
test_script = "network_bench.js"
|
||||
|
||||
["h2-download"]
|
||||
browsertime_args = "--browsertime.test_type=h2_download --browsertime.iterations=10 --firefox.preference=network.http.http3.enable:false"
|
||||
test_script = "network_bench.js"
|
||||
|
||||
Reference in New Issue
Block a user