├── collectd.prom ├── AUTHORS ├── platformx ├── platformx_linux.go ├── platformx.go └── platformx_stub.go ├── .gitignore ├── html ├── images │ ├── mlab-logo.png │ └── mlab-logo-small.png ├── fonts │ ├── League_Gothic.eot │ ├── League_Gothic.otf │ └── digital-7-mono.ttf ├── ie.css ├── embed.html ├── index.html ├── mlab │ └── index.html ├── ndt-wrapper-ww.js ├── ndt7-download-worker.js ├── ndt7.html ├── widget.html ├── ndt7-upload-worker.js ├── ndt-wrapper.js └── style.css ├── metadata └── namevalue.go ├── version └── version.go ├── tcpinfox ├── tcpinfox_stub.go ├── tcpinfox.go └── tcpinfox_linux.go ├── gen_local_test_certs.bash ├── lame_duck.prom ├── Dockerfile.local ├── bbr ├── bbr_stub.go ├── bbr.go └── bbr_linux.go ├── ndt5 ├── web100 │ ├── web100_stub.go │ ├── web100.go │ └── web100_linux.go ├── control │ └── data.go ├── ws │ └── ws.go ├── ndt │ └── server.go ├── protocol │ ├── messager_test.go │ ├── protocol_test.go │ └── messager.go ├── README.md ├── meta │ ├── meta.go │ └── meta_test.go ├── handler │ └── wshandler.go ├── metrics │ └── metrics.go ├── plain │ └── plain_test.go ├── c2s │ ├── c2s_test.go │ └── c2s.go ├── s2c │ └── s2c.go └── singleserving │ └── server.go ├── testdata └── package.json ├── Dockerfile ├── test.sh ├── ndt7 ├── closer │ └── closer.go ├── ping │ └── ping.go ├── upload │ ├── upload.go │ └── sender │ │ └── sender.go ├── download │ ├── download.go │ └── sender │ │ └── sender.go ├── ndt7test │ ├── ndt7test.go │ └── ndt7test_test.go ├── handler │ ├── handler_test.go │ └── handler_integration_test.go ├── metrics │ ├── metrics.go │ └── README.md ├── model │ └── archivaldata.go ├── results │ └── file.go ├── spec │ └── spec.go ├── listener │ └── listener.go ├── receiver │ └── receiver.go └── measurer │ └── measurer.go ├── .travis.yml ├── logging ├── logging_test.go └── logging.go ├── cmd └── generate-schemas │ ├── main.go │ └── go.mod ├── metrics └── metrics.go ├── go.mod ├── fullstack ├── Dockerfile ├── README.md └── start.sh ├── cloud-config.yaml ├── netx ├── iface │ └── fdinfo.go ├── net.go └── net_test.go ├── docker-compose.yml ├── data └── result.go ├── deploy_ndt_to_gce.sh ├── spec └── data-format.md ├── README.md └── TestDockerfile /collectd.prom: -------------------------------------------------------------------------------- 1 | collectd_mlab_success{experiment="utility.mlab"} 1 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Stephen Soltesz 2 | Peter Boothe 3 | Simone Basso 4 | Roberto D'Auria 5 | -------------------------------------------------------------------------------- /platformx/platformx_linux.go: -------------------------------------------------------------------------------- 1 | package platformx 2 | 3 | func maybeEmitWarning() { 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /cert.pem 2 | /key.pem 3 | /ndt7-*.jsonl.gz 4 | .idea/** 5 | /certs 6 | /datadir 7 | -------------------------------------------------------------------------------- /html/images/mlab-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-lab/ndt-server/HEAD/html/images/mlab-logo.png -------------------------------------------------------------------------------- /html/fonts/League_Gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-lab/ndt-server/HEAD/html/fonts/League_Gothic.eot -------------------------------------------------------------------------------- /html/fonts/League_Gothic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-lab/ndt-server/HEAD/html/fonts/League_Gothic.otf -------------------------------------------------------------------------------- /html/fonts/digital-7-mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-lab/ndt-server/HEAD/html/fonts/digital-7-mono.ttf -------------------------------------------------------------------------------- /html/images/mlab-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-lab/ndt-server/HEAD/html/images/mlab-logo-small.png -------------------------------------------------------------------------------- /html/ie.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "League Gothic"; 3 | src: url("fonts/League_Gothic.eot"); 4 | } 5 | 6 | 7 | -------------------------------------------------------------------------------- /metadata/namevalue.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // NameValue is a BigQuery-compatible type for ClientMetadata/ServerMetadata "name"/"value" pairs. 4 | type NameValue struct { 5 | Name string 6 | Value string 7 | } 8 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | // Package version contains ndt-server version 2 | package version 3 | 4 | // Version is the version of ndt-server. You override this at compile time 5 | // using `-ldflags "-X variable=value"` facility. 6 | var Version string 7 | -------------------------------------------------------------------------------- /tcpinfox/tcpinfox_stub.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package tcpinfox 4 | 5 | import ( 6 | "os" 7 | 8 | "github.com/m-lab/tcp-info/tcp" 9 | ) 10 | 11 | func getTCPInfo(*os.File) (*tcp.LinuxTCPInfo, error) { 12 | return &tcp.LinuxTCPInfo{}, ErrNoSupport 13 | } 14 | -------------------------------------------------------------------------------- /gen_local_test_certs.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euxo pipefail 4 | 5 | openssl genrsa -out key.pem 6 | openssl req -new -x509 -key key.pem -out cert.pem -days 2 -subj "/C=XX/ST=State/L=Locality/O=Org/OU=Unit/CN=localhost/emailAddress=test@email.address" 7 | mv key.pem cert.pem certs/ 8 | -------------------------------------------------------------------------------- /platformx/platformx.go: -------------------------------------------------------------------------------- 1 | // Package platformx contains platform specific code 2 | package platformx 3 | 4 | // WarnIfNotFullySupported will emit a warning if the platform is not 5 | // fully supported by github.com/m-lab/ndt-server. 6 | func WarnIfNotFullySupported() { 7 | maybeEmitWarning() 8 | } 9 | -------------------------------------------------------------------------------- /platformx/platformx_stub.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package platformx 4 | 5 | import ( 6 | "github.com/m-lab/ndt-server/logging" 7 | ) 8 | 9 | func maybeEmitWarning() { 10 | logging.Logger.Warn("This platform is not officially supported. It will work with reduced functionality.") 11 | } 12 | -------------------------------------------------------------------------------- /lame_duck.prom: -------------------------------------------------------------------------------- 1 | # HELP lame_duck_node Whether node is in lame-duck mode. 1 yes, 0 no. 2 | # TYPE lame_duck_node gauge 3 | lame_duck_node 0 4 | # HELP lame_duck_experiment Whether an experiment is in lame-duck mode. 1 yes, 0 no. 5 | # TYPE lame_duck_experiment gauge 6 | lame_duck_experiment{experiment="ndt.iupui"} 0 7 | -------------------------------------------------------------------------------- /Dockerfile.local: -------------------------------------------------------------------------------- 1 | FROM golang:1.20 as ndt-server-build 2 | ADD . /go/src/github.com/m-lab/ndt-server 3 | ADD ./html /html 4 | 5 | RUN /go/src/github.com/m-lab/ndt-server/build.sh 6 | RUN cp /go/bin/ndt-server / 7 | RUN cp /go/src/github.com/m-lab/ndt-server/gen_local_test_certs.bash / 8 | 9 | WORKDIR / 10 | CMD ["/ndt-server"] 11 | -------------------------------------------------------------------------------- /bbr/bbr_stub.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package bbr 4 | 5 | import ( 6 | "os" 7 | 8 | "github.com/m-lab/tcp-info/inetdiag" 9 | ) 10 | 11 | func enableBBR(*os.File) error { 12 | return ErrNoSupport 13 | } 14 | 15 | func getMaxBandwidthAndMinRTT(*os.File) (inetdiag.BBRInfo, error) { 16 | return inetdiag.BBRInfo{}, ErrNoSupport 17 | } 18 | -------------------------------------------------------------------------------- /html/embed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example of embedded widget 6 | 7 | 8 | 9 |