Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



8 Commits

Repository files navigation


A tool to measure the round-trip time and bandwidth of a TCP connection with different methods. Bandwidth (or more precisely Goodput) is measured with the harmonic mean. rtt is measured via weighed moving average.

Currently tcp-metrics only supports resources that are available via HTTP/1.1. The reason for this is that most static resources are available via HTTP and it is easy to deploy a static testing resource on a HTTP server.

Two methods are available to measure the Goodput:

1.: by using the first timestamp as the start time.

2.: by using a later subsequent timestamp as the start time (to avoid bursts and slow-start falsifying the estimate).

For detailed information concerning the techniques applied please check out


Usage: tcp-metrics [OPTION...] DOMAIN PATH

Example: tcp-metrics /your/resource

  -a, --all                  Measure everything - option1 + option2 + rtt.
  -b, --bandwidth-method-A   Measure the bandwidth with option 1, meaning the
                             first operations are skipped in
                             order to avoid initial bursts and TCP slow-start
                             to falsify the result.
  -c, --bandwidth-method-B   Measure the bandwidth with option 2, meaning we
                             measure beginning from the first
  -k, --skips=Skips          Number of Skips to avoid bursting
                             and TCP slow-start to falsify the result - by
                             default this value is 10. Note that a value of 0
                             here would be the same as using measurement option
                             2 (-c).
  -m, --multi                If set, for each round a different TCP socket is
                             used. That way you might get a better overall
                             estimate about an expected path between the client
                             and the resource. Please note, that you need at
                             least two measurement rounds for this option,
                             since otherwise you will only use one TCP socket
  -n, --rounds=Rounds        Number of repeated measurement Rounds. In order
                             to get a fair estimate of the rtt, several rounds
                             should be used. By default this value is 1.
  -p, --port=Port            The Port the resource to measure is available at
                             - default is 80.
  -r, --rtt                  Measure the rtt.
  -s, --size=Size            Size of the receiver buffer - if not specified,
                             by default a 2MB receiver buffer is used. Note
                             that on each the buffer is written
                             from the start (it is just a dummy buffer...).
                             Please note, that if this buffer is to small, the
                    operation does not have enough
                             memory to store data to - thus a huge bottleneck
                             in the application layer would occur.
  -t, --timeout=Timeout      The socket Timeout in seconds - by default 2s.
  -v, --v                    Verbose - print subsequent estimates to stdout.
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.


A tool to measure the round-trip time and bandwidth of a TCP connection with different methods.







No releases published


No packages published