In late 2021 and early 2022, researchers at Apple took to heart the internet-wide call for giving users more actionable information about the state of their network connections and proposed a new metric, RPM:
This document specifies the "RPM Test" for measuring responsiveness. It uses common protocols and mechanisms to measure user experience especially when the network is under working conditions. The measurement is expressed as "Round-trips Per Minute" (RPM) and should be included with throughput (up and down) and idle latency as critical indicators of network quality.
Apple wrote and released an implementation of the test in its iOS and macOS operating systems in versions 15 and Monterey, respectively.
The researchers at Apple, in collaboration with others throughout the internet-measurement community, proposed RPM as an IETF RFC.
To become a Draft Standard, "at least two independent and interoperable implementation[s]" must exist [RFC2026]. The goal of this implementation of the standard is to satisfy that requirement.
- Go (1.21 -- see below)
- The source code
Note: When go 1.22 is released, this client will upgrade to that version of go. There is an important fix to the runtime (see here) that we need to incorporate for correctness.
To install Go, follow the excellent documentation online.
To get the source code,
$ git clone https://github.com/network-quality/goresponsiveness.gitFor the remainder of the instructions, we will assume that ${RSPVNSS_SOURCE_DIR} is the location of the source code.
From ${RSPVNSS_SOURCE_DIR} grab all the required modules:
$ go mod downloadAnd then build:
$ go build networkQuality.goThat will create an executable in ${RSPVNSS_SOURCE_DIR} named networkQuality.
As a bonus, there are now
makeable targets (all,build,test,clean) in case that's easier to remember!
From ${RSPVNSS_SOURCE_DIR}, running the client is straightforward. Simply
$ ./networkQualityWithout any options, the tool will attempt to contact networkquality.example.com on port 4043 to conduct a measurement. That's likely not what you intended. To find out all the options for configuring the execution of the tool, specify the --help option:
$ ./networkQuality --helpnetworkQuality with the -help option will generate the following output:
-config string
name/IP of responsiveness configuration server. (default "networkquality.example.com")
-debug
Enable debugging.
-path string
path on the server to the configuration endpoint. (default "config")
-port int
port number on which to access responsiveness configuration server. (default 4043)
-profile string
Enable client runtime profiling and specify storage location. Disabled by default.
-ssl-key-file string
Store the per-session SSL key files in this file.
-sattimeout int
Maximum time to spend measuring saturation. (default 20)
-rpmtimeout int
Maximum time to spend calculating RPM. (default 10)
To facilitate testing, you may want to use the open-source RPM server available from Apple on GitHub.
You can also test against the Apple infrastructure using:
$ ./networkQuality --config mensura.cdn-apple.com --port 443 --path /api/v1/gm/configThis repo contains a Dockerfile for running the binary so you don't have to install any languages or build tools. To use it:
# build the container
docker build -t goresp .
# run the RPM test
docker run --rm goresp
# run the RPM test with full options, testing against Apple infrastructure
docker run --rm goresp --config mensura.cdn-apple.com --port 443 --path /api/v1/gm/config --debugWe love contributions. Before submitting a patch, first format your code with go fmt. Then, run golines:
$ golines -w .You can easily install golines in to your ${GOPATH} with
$ go install github.com/segmentio/golines@latestAs a bonus, there are unit tests to check for regressions:
$ go test ./timeoutat ./ms ./utilities ./traceableIf you are developing with VSCode, you can use ide/settings.json as the
workspace's settings.json file
in order to meet the project's existing style. In particular, this file will configure
VSCode to use an alternate go formatter known as gofumpt
and, in turn, give gofumpt specific configuration directives.
To use the included settings.json file, simply drop it in the .vscode directory of the folder
containing this README.md file.
Note: If you have existing workspace settings, you may be required to take additional steps to incorporate the information in the given
settings.jsonfile.
You may have to create the
.vscodedirectory if it does not already exist.