- client: new feature scheduler (
-scheduleflag):nspeed get -schedule 1s,1s urlwill connect to url, wait 1s, download for 1s, then stop. General format is:-schedule h0,w0,h1,w1,...,hN[,wN]= hold h0, work for w0 , hold h1, work w1,...,hold hN, work wN is present or till end of content/timeout. Global timeout (defaut none) and command timeout (defaut 8 seconds) always take priority:nspeed get -schedule 1s,20s urlwon't last 21s but only 8s. For now the-scheduleflag is incompatible with the-repeatflag and scheduling steps are not reported in verbose/debug/trace logs. - ui: Added
matchatest. - bug fixes (tcp client, repeat)
- chores: Updated dependencies (quic-go, psutils, x/net).
- client & server: new
-mtu sizeflag to set the initialize packet size (quic-go related only) - client: new flag repeat flag
-r nallow to repeat the commandntimes. The client we'll try to reuse the connection if possible. - bench: breaking change HTTP/1.1 benchmark names are now consistent with HTTP/2 (
h1gis with tls,h1cgwithout) - bench:
-idare now names of the benchmarks - bench: new meta benchs:
httpandquic fromcommand: new template feature. use repeated-var a=bflag(s) to define a variable and its value. Use variables with Go template syntax in content:{{.a}}will becomebor nothing isais not defined. Full go text template features are available. See https://pkg.go.dev/text/template- general:
-idvalues now support double-quoted values (-id "my id") - using
go 1.24.1 - general:
-preorpostdelays implemented forthen - general: new flag
-buffer valueallows to set the buffer size used for i/o operations (-1 for max value, 0 for Go default) - ui: preview of ui, for now it's just a CLI/terminal in web page
- charting: moved from chartjs to echarts.
-htmlnow produces working graphs. use-ratefor graphing series. - charting: use
nspeed ui -viewerspecial UI mode to open the json charts viewer (equiv:-html :from-jsonfile)
- breaking change: global flag
-colorremoved. Colors are now on by default, use the new flag-nocolorto disable them. - major internal refactoring of packages. more packages open source'd to this repo.
cmd/getroutedemo program fornspeed.app/networkpackage
- deps: updated psutil to v4 to fix Darwin builds
- fix: self certificate expiration date
- fix: bench typo
- new protocol: raw quic connection are now also available for
server,get,post,putcommands. Add-P quicto use quic instead of http. this is a wip/experimental feature , see https://pkg.go.dev/golang.org/x/net/quic - new protocol: raw tcp connection are now also available for
server,get,post,putcommands. Add-P tcpto use tcp instead of http. TLS can be used or not. - new protocol: raw quic-go connection are now also available for
server,get,post,putcommands. Add-P quic-goto use quic-go instead of http - new command:
from uri(abbr.f) will read commands from the file/url (use-for stdin) - new command:
then [options](abbr.t) execute previous command(s) before continuing. - new command:
bench(abbrb) (see corresponding bench section below) - using semantic version (before it would have been v0.11 -> now it's v0.0.11)
- using goreleaser
- using Go 1.23
- Darwin (MacOS) build: -cpu now works
- using GOAMD64 levels: (see https://github.com/golang/go/wiki/MinimumRequirements#amd64 ). for now only level1 (_v1) is built.
- less info displayed with
-version. Use-version fullfor more infos. - breaking changes in behavior: 'infinite' commands (commands that usually never end like
serverandapi) are stopped if combined with "short-lived" commands likegetorput(for instancenspeed server get http://google.com/will end after thegetis finished. In previous version it would wait forever for a kill signal). If all commands are "infinite" then the program will not stop until killed (=daemon mode) - cleaned out text output, reformatted cpu output. Verbose & debug messages now display the job name at the beginning of the line.
- new flags:
-display-log-leveland-display-log-timeto toggle their respective fields. - breaking change: the
-tick durationflag is now a duration instead of an integer of seconds (default remain 1 second). It doesn't control the sampling rate of-cpuanymore (see-cpurate). The-tickrate is the rate of trace & debug messages. - new flag:
-rate durationused to set the frequency generating the time series data for json/html output Default is 1s. - new flag:
-cpurate durationused to set the cpu sampling rate (implies-cpu) - new flag:
-html filenameto record the results to a html file. Use-rate durationto add time series. (wip. on local machine using:as filename will open directly the result in a web browser (no html file is created , it is just sent to the browser using a temporary web server)) - new flag:
-json filenameto record the results to a json file. Use-rate durationto add time series. - new flag:
-dns-server address[:port]to specify a dns server (literal ip address with optional port) - new flag:
-ungroupshow each stream result of a multi-streams command (see client below) - new flag:
-4/-6to use IPv4 only or IPv6 only (doesn't override these options at the command level)
- new
benchcommand (abbrevb) : allow to launch loopback interface tests (server and get/put on a localhost server). seenspeed bench -hfor available benchmarks.
- breaking changes:
-tflag renamed to-mto be like curl. - new flags:
-http1.1and-http2to enforce the HTTP version used - breaking change: the default port is now a random , available port instead of 7333. Use
-p portto use a specific port. - new flag:
-id stringto set a uniq id/name for this server (which then can be used innspeed://nameurl scheme) - An upload to a nspeed server (
PUTandPOST) now returns metrics data in json format in the response body - a request of the root path ('/') will now return some informations in json (instead of "Not found (no regexp match)")
- A download from a nspeed server returns a special header named
x-nspeed-guidwhich value is a short-lived unique identifier identifying this download. Sending a request to the server with that same header will return the metrics data in json of this download. The delay is 5 seconds (could change in the future or be configurable). See examples section in the README.md file.
- the
getcommand now accepts the-sizeto limit the number of bytes received (defaut is 0 = no limit) - breaking changes:
-http11flag renamed to-http1.1 - breaking changes:
-tflag renamed to-mto be on par with Curl. - in conjunction with the new server
-idflag, a special new url schemenspeed:nameis now supported to reference the url address of the corresponding server (draft) - new flag:
-connect-timeoutmaximum duration for the initial connection (=timeout before dial abort) - new flag:
-http2to force using HTTP/2 - new flag:
-id stringto set a uniq id/name for this command - multiple connections commands (
-n numberflag) are now summed and grouped in the report. Use the new global flag-ungroupto see each result for each connection.
- fixed TLS version text messages
- experimental support of HTTP/3 using quic-go ( see HTTP/3 section )
- internal optimization to buffer sizes and http/2 issues (tracking various Go HTTP/2 performance issue being addressed by the Go team)
- using Go 1.19.
nspeed -versionnow also displays the Go version used to build the binary as well as OS/Arch information - new
-pre durationoption: waitdurationbefore starting command(s) (durationuses Go syntax: "2s" for 2 seconds for instance) - new
-post durationoption: waitdurationafter all commands have ended - new
-infoflag to display some os/hardware information - new
-text filenameflag: report the results to a text file (use-for stdout which is the default) - new
-traceflag: display lot of debug/trace information (wip - mainly used for quic/http3 tracing) - switch to psutil v3
- fix global timeout
- new endpoints:
/stats/infoand/stats/mem, see API.md - new flags:
-stats,-statsonlyand-statsdebug: enable real time web UI stats view at/rlurl path.statsonlydisable all other api routes.statsdebugadds Go runtime specifics stats at url path:/debug/statsviz - new flag:
-browse: open the default web browser at/rlurl
- new option
-http3to enable HTTP/3. Implies-selfif no TLS cert & key files are provided.
- breaking change: HTTP client can now do
PUTorPOSTwith corresponding matching command names. A newpostcommand was added to do the POST HTTP method and the previouslyputcommand does now a 'PUT' method instead of a POST - new option
-http3to enable HTTP/3 (this will force HTTP/3 if the server support it and fallback to HTTP/2 or HTTP/1.1 if not). Implies-selfif no TLS cert & key files are provided. - console output displays news information per job: final target IP, latency and protocol
- default to
https://if no scheme provided (nspeed get google.comis the same asnspeed get https://google.com)
- updated for Go 1.17+ internal changes
- this command can no longer be called with other commands even with itself because of a global side-effect/trick. This command is not available thru the API.
- displays AES hardware support
The implementation used is https://github.com/quic-go/quic-go. In trace mode (-trace) QLog trace files are generated in the current directory. They can be analyzed with https://qvis.quictools.info/
- lots of internal refactoring (for the api/ui and a new internal scheduling/cancellation system)
- command names can be shortened as long as it is not ambiguous. For instance
geor justgcan be used instead ofget. - added
l[atency]andt[raceroute]command names (placeholder, these commands are not yet implemented) - added
apicommand (see below and API.md)
- a new
apicommand allowing NSpeed to be controlled by a simple HTTP request (REST). Theapicommand create a new API endpoint with default value (localhost,7333). Theservercommand can also be an API endpoint with the new-apiflag. See API.md for more information about the API. - for now the
apionly return text strings. Later the a standard metrics format will be used.
getandputmandatory arguments (-urland-urland-sizerespectively) can now be prefixed with a flag keyword allowing to change their order. for instancenspeed get -4 http://google.comis equivalent tonspeed get -url http://google.com -4- IP version displayed in text results
apiflag: see theapicommand-dir path,serve static files from path. path is a local directory to serve content from (from/dirurl ). The max duration parameter applies (-t) but not the max size parameter (-s).
- "cypher" spelling replaced with "cipher" everywhere including the
cipherscommand ("cypher" is a minority spelling so less prone to be known or searched for)
- a few typos fixes
- added
-h2cmode to client & server to allow HTTP/2 Cleartext (H2C)
-http11flag to force HTTP 1.1 when connecting to HTTP/2 server
- new command
cyphersto list supported cyphers with that server (will test only TLS 1.2 and 1.3)
- global flags:
-self: activate self-signed certificate for all clients (get & put)-color: use colors in output (by default there will be no color at all)-cpu: display cpu usage (every second).-debug&-verbosedon't display cpu usage anymore
- news debug metrics:
ReadCount,WriteCount(how many OS level Read & Write calls were performed) andAverageReadSize,AverageWriteSize(total volume/count) - fix some usage messages
-selfflag: listen in https mode using a self-signed certificate- bigger buffer when sending
- paths in url for upload (
/p) & download (/g) removed. just use the root path/for both (see the updated README.md examples) - download paths can now have an extension. For instance
/10G.iso. The Content-Type header will be set accordingly to https://golang.org/pkg/mime/#TypeByExtension. - query parameters:
ctquery parameter added: set the returned content-type header, for instance: http://localhost:7333/1k.jpg?ct=text/plain will return a content-type oftext/plaininstead ofimage/jpeg("ct" has precedence over the extension. With no precedence orctparameter, the default content-type isapplication/octet-stream).chunk_sizequery parameter limited to 1 MiB (it's allocated once, this will be tuned later)seedquery parameter removed (this will return later)
- disable compression
- dns report is back in -verbose mode
-self: same as global '-self' flag
- the self-signed cert only work for 'localhost, 127.0.0.1,::1'. Next vesion will allow test https over a LAN between trusted machines, meanwhile use
-kflag with nspeed or curl.
#v0.6
- '-a' flag now always prefers IPv6 first
- major overhaul of displayed messages (zerolog package)
- display usage if no argument
- all commands can now be mixed together (*)
- by default now nspeed outputs less messages. "-verbose" displays these messages.new option "-debug" acts like v0.5 "-verbose" option.
- new '-log filename' flag to write result to a structured file (not finalized)
- colorized cpu with the -verbose option
-"-d duration" duration after which the server shutdown (duration must have at least one unit of: s,m or h or a combination 5h20m5s for instance)
-"-n value" number of requests after which the server shutdown
- "-w duration" wait delay before starting the command
(*) The new flags allow to test with a single nspeed command, for instance:
nspeed server -n 2 get -w 1 -n 2 http://localhost:7333/g/1g
This will launch a server and it will answer to 2 requests then stop and a "get" client that will wait 1 second and perform 2 requests to the server.
- better usage help text
- better formatting in verbose mode (-verbose)
- parsed units allow now decimal precision ("2.2g")
- "-h" host option changed to "-a" (since "-h" is standard for help)
- default host is now "localhost"
- "-4" and "-6" options to use IPv4 or IPv6 only (must be consistent with "-a")
- the "-s" option can now parse units of bytes like the client (for instance: "-s 1g" for 1GB, "-s 1G" for 1GiB)
- the "-t" now parse seconds only instead of requiring a unit (consistent with client)
- route '/p' is also accepted instead of redirecting to '/p/'
- added name & version in a http response header
- "-4" and "-6" options are now working
- "-k" option to ignore certificate validation
- "-a host|interface|ip" option
- server: the default host is now 'localhost' which leads to bind only to IPv4 (Go bug: golang/go#9334). A temporary workaround is to launch a second server instance with the -6 flag:
nspeed server server -6will listen to localhost on IPv4 and IPv6. A fix will be implemented soon. Some OS can fail to resolve 'localhost' to ::1 even if they have IPv6 configured. In that case use "-a ::1" explicitly (nspeed server server -a ::1) - put/post: redirect(s) happen after the upload which normal behavior for a HTTP POST/PUT.
- performance inconsistencies on Windows
- '-a "" ' doesn't parse on Windows, workaround: use '-a=""'
- server: '-a interface_name' bind to the first candidate address (ipv6/ipv4/link-local) found for that interface. It's not the same behavior as a bind with SO_BINDTODEVICE (which is platform specific).
- client: '-a interface_name' use the first candidate address (ipv6/ipv4/link-local) found for that interface. It doesn't perfom a source address selection depending on the destination.
first alpha
technical preview
technical preview
technical preview