GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - FrankRay78/NetPace: Network speed tester including server discovery, latency measurement, download and upload speed testing.

BranchesTags
Open more actions menu

Latest commit

 

History

393 Commits
393 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.gaffer
.gaffer
 
 
.github
.github
 
 
docker/lab
docker/lab
 
 
docs
docs
 
 
examples/ConsoleApp
examples/ConsoleApp
 
 
resources
resources
 
 
scripts
scripts
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
CONVENTIONS.md
CONVENTIONS.md
 
 
INSTALLATION.md
INSTALLATION.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
REVIEW.md
REVIEW.md
 
 
USER_GUIDE.md
USER_GUIDE.md
 
 
global.json
global.json
 
 

Repository files navigation

NetPace

NuGet Build & Tests

Network speed tester including server discovery, latency measurement, download and upload speed testing.

Built with .NET 10.0 — runs on Windows, Linux, and macOS.

Important

NetPace is pre-1.0. Any release may change or remove command-line options, output formats or NetPace.Core library members, without a deprecation period. Backward compatibility will be maintained from 1.0.0 onwards.

Report Bug - Request Feature

Fan of NetPace? Consider giving the repo a star ⭐ - it helps others find it too.


Features

  • Server discovery, latency measurement, download and upload speed testing.
  • Command-line application and C# Microsoft .Net NuGet library for developers.
  • A live table at the terminal: a row per test, with its speed and the latency measured while it ran, so idle and under-load latency read down one column.
  • User configurable output (eg. SI or IEC units, bits or bytes, CSV and Json formats). --minimal, --simple, --csv and --json are the stable formats for scripts; the terminal layout is for people and may change in any release.
  • Colour themes, chosen once with NETPACE_THEME and applied to every command.
  • Highly configurable traffic profiles (see LatencyTestSettings, DownloadTestSettings and UploadTestSettings).
  • Highly reliable, utilises Ookla's Speedtest servers.
  • Or test against a LibreSpeed server you host yourself, with --provider librespeed --server-url <address>, to tell a problem inside the house from a problem with the line.

About The Project

A cross-platform command-line application for performing network speed tests, including server discovery, latency measurement, download and upload speed testing. The core speed test library, NetPace.Core, has been designed for developer use and can be installed via NuGet.

NetPace is not affiliated with or endorsed by Ookla or Speedtest by Ookla in any way, although their servers are used by the default speed test provider.

The obligatory screenshot (as of 29 August 2025 — the terminal layout has moved on since, and now draws a live table; see Choosing an output format):

NetPace_Screenshot_2025-08-29

Background

This project came out of my time as the Spectre.Console CLI sub-system maintainer, having never actually used the library for myself. I wanted to gain practical experience by developing a command-line application, following best practices such as the Command Line Interface Guidelines, and then applying that experience in my maintainer role. This is also known as 'dogfooding' in the tech industry ie. using your own product before expecting others to do the same.

I am no longer the Spectre.Console CLI sub-system maintainer, but this project continues to be well supported.


Installation

  • Windows: winget install netpace
  • macOS and Linux: brew install FrankRay78/tap/netpace
  • Any platform with the .NET 10 SDK: dotnet tool install -g netpace
  • Or download a binary from the releases page

See INSTALLATION.md for platform notes and which build each route gives you.


Usage

For most users, running a simple speed test is as easy as:

netpace

On a metered or IoT connection? Use the tiny profile (≤ 1 MiB total per run):

netpace --profile tiny

Prefer a different look? Set NETPACE_THEME once (default for NetPace's own colours, plain for no colour at all, green, or halloween) and every command is drawn that way:

export NETPACE_THEME=green

NO_COLOR outranks it, and output meant for another program to parse is the same whatever the theme. See the User Guide for the detail.

For common scenarios and advanced usage (such as scripting, restricting payload size, choosing a traffic profile, or customising output), see the User Guide.

netpace --help will display detailed usage instructions.

$ netpace --help

 _  _       _    ___
| \| | ___ | |_ | _ \ __ _  __  ___
| .` |/ -_)|  _||  _// _` |/ _|/ -_)
|_|\_|\___| \__||_|  \__,_|\__|\___|

DESCRIPTION:
Network speed tester including server discovery, latency measurement, download and upload speed testing.

USAGE:
    netpace [OPTIONS] [COMMAND]

OPTIONS:
                              DEFAULT
    -h, --help                           Prints help information.
    -v, --version                        Prints version information.
        --loop                           Performs the speed test on continuous loop.
        --count                          Stop speed testing after this many times.
        --delay                          Time between multiple speed tests (30s, 10m, 2h or 1d up to 30d, or HH:MM:SS up to 23:59:59).
        --time-limit          10m        Stop a speed test run after this long (30s, 10m, 2h or 1d up to 30d, or HH:MM:SS up to 23:59:59).
                                         A run that reaches the limit reports what it measured up to then.
                                         Each run of --count or --loop gets the limit afresh, and --delay is not counted.
        --csv                            Display output as a single CSV row (always includes timestamp).
        --no-csv-header                  Do not write the header row (CSV output only).
                                         An appended --file target that already holds rows is never sent the header.
        --json                           Display output in Json format.
        --json-pretty                    Display output in Json format (pretty print).
        --minimal                        Display the result as a single timestamped line per run.
                                         Ideal for watching repeated runs with --loop or --count.
        --simple                         Display the result as one named line per figure: Ping, Download, Upload.
                                         Ideal for batch scripts and line-based parsing.
        --no-latency                     Do not perform latency test.
                                         When used without --server-url, the first server listed is selected.
        --no-download                    Do not perform download test.
        --no-upload                      Do not perform upload test.
        --provider            ookla      The kind of server to test against. <ookla, librespeed>
                                         'librespeed' needs --server-url or --server-file naming where LibreSpeed is installed.
        --server-url                     The URL of a specific speed test server.
                                         'netpace servers -l' will return your nearest servers.
                                         With --provider librespeed, the address LibreSpeed is installed at.
        --server-file                    A JSON file listing the servers to choose from, in place of Ookla's nearby list.
                                         Each entry gives a 'url' and an optional 'name', shown as the server's sponsor.
                                         Not with --server-url, which names one server outright.
        --profile             medium     Profile bundle of payload settings. <tiny, small, medium, large, mega>
        --downloadsize                   Stop the download test after this many megabytes (IEC MiB).
        --uploadsize                     Stop the upload test after this many megabytes (IEC MiB).
        --connections                    Maximum transfers the download and upload tests each run at once (1-32).
                                         Overrides the --profile connection count; the profile's data caps still apply.
                                         A maximum, so a profile with fewer transfers to run than this will not reach it.
    -u, --unit                bits       The speed unit. <bits, bytes>
                                         Applies to the default, minimal and simple output.
        --unit-scale          auto       The speed unit scale. <auto, base, kilo, mega, giga, tera, peta>
                                         Applies to the default, minimal and simple output.
        --unit-system         SI         The speed unit system. <SI, IEC>
                                         Applies to the default, minimal and simple output.
                                         SI steps up in powers of 1000 (KB, MB, GB), common in networking,
                                         while IEC uses powers of 1024 (KiB, MiB, GiB), standard in computing and storage.
        --device-id                      Record a label for this machine in CSV and JSON output.
                                         The CSV column is always present; the JSON field appears only when a label is given.
        --custom-field                   Record a key=value pair in CSV and JSON output.
                                         May be given more than once, and is recorded in the order given.
    -f, --file                           Write output to file.
        --file-mode           append     Determines file output behavior. <append, overwrite>
    -q, --quiet                          Suppress all normal console output (file output still works).
        --fail-on             none       Exit 4 on a failed measurement. <none, total, partial>
                                         With 'none' the exit code is never affected; 'total' triggers when a test is all-failed;
                                         'partial' triggers on any failed request. Fail-fast across --count and --loop.
        --min-download                   Exit 3 when the download speed is below this, such as 50Mbps.
                                         Takes any unit NetPace writes a speed in, whatever --unit, --unit-system and --unit-scale say.
                                         Checks one run, so not with --loop, --count above 1, or --no-download.
        --min-upload                     Exit 3 when the upload speed is below this, such as 50Mbps.
                                         Read the same way as --min-download; not with --loop, --count above 1, or --no-upload.
        --max-latency                    Exit 3 when the idle latency is above this, such as 40ms.
                                         Milliseconds only; not with --loop, --count above 1, or --no-latency.
        --diagnostics                    Write per-request diagnostic detail about the run to the error stream.
                                         The result is unchanged, so 'netpace --json --diagnostics > result.json 2> diagnostics.log' keeps the two apart.
        --diagnostics-file               Write the diagnostic detail to this file instead of the error stream.
                                         Turns diagnostics on by itself, and replaces the file on every run.

COMMANDS:
    servers    Show the nearest speed test servers.

ENVIRONMENT:
    NETPACE_THEME  Colour theme to draw in. <default, plain, green, halloween>

EXIT CODES:
    0  Ran, and met every opt-in condition asked for.
    1  Operational fault: NetPace could not do its job.
    2  Usage error: the command line itself cannot be run.
    3  A --min-download, --min-upload or --max-latency target was missed.
    4  --fail-on was triggered by a failed measurement.
    Where more than one applies, the most serious wins: 2 over 1 over 4 over 3.

SEE ALSO:
    https://github.com/FrankRay78/NetPace/blob/main/USER_GUIDE.md

Developer Use

Want to integrate network speed testing into your own app?

Install the core library via NuGet:

dotnet add package NetPace.Core

Then use the ISpeedTestService interface:

using NetPace.Core;
using NetPace.Core.Clients.Ookla;

var speedTester = new OoklaSpeedtest() as ISpeedTestService;

var servers = await speedTester.GetServersAsync();
var fastest = await speedTester.GetFastestServerByLatencyAsync(servers);

var downloadResult = await speedTester.GetDownloadSpeedAsync(fastest.Server);
var uploadResult = await speedTester.GetUploadSpeedAsync(fastest.Server);

Console.WriteLine($"{fastest.Server.Sponsor} ({fastest.LatencyMilliseconds} ms)");
Console.WriteLine($"Download: {downloadResult.GetSpeedString(SpeedUnit.BitsPerSecond, SpeedUnitSystem.SI)}");
Console.WriteLine($"Upload: {uploadResult.GetSpeedString(SpeedUnit.BitsPerSecond, SpeedUnitSystem.SI)}");

The example above uses the OoklaSpeedtest implementation which uses Ookla Speedtest servers under the hood. Ookla and Speedtest are trademarks of Ookla, LLC; this project is not affiliated with or endorsed by Ookla.

See the ISpeedTestService interface for full method details and overloads.

Example Console App is a minimal usage example, and NetPace command-line application is an extensive, production-quality usage example.


Testing Your Code

NetPace.Core includes test doubles for the library's interfaces so you can test your code without making real network calls. They are a supported part of the library: each double's documented behaviour is covered by its own tests, so a release cannot change one of these figures without a test failing first.

  • SpeedTestStub - Simple stub returning fixed values with configurable delays
  • SpeedTestMock - Fully configurable mock with injectable delegate functions
  • VariableSpeedTester - Returns different speeds on each call (simulates variable network conditions)
  • FaultySpeedTester - Simulates network failures and timeouts (for testing error handling)
  • DelayProviderStub - Stands in for IDelayProvider, recording the pauses your code asked for instead of waiting them out

See the implementations in NetPace.Core.Clients.Testing and their usage throughout the solution.


Contributing

Important

I'm not currently accepting pull requests for this project.

You can contribute by opening a new issue or commenting on existing ones, and you are most welcome to fork the repository for your own purposes.

But please don't be offended if I close or delete issues as I see fit.


License

Distributed under the MIT license. See LICENSE for more information.

About

Network speed tester including server discovery, latency measurement, download and upload speed testing.

Topics

clidotnetdotnet-libraryinternet-speedinternet-speed-checkerinternet-speed-testlibrarynetwork-speednetwork-speed-meternetwork-speed-testspeedtestspeedtest-cli

Resources

Readme
MIT license
Activity

Stars

12 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.