项目作者: fishi0x01

项目描述 :
A tool to measure the round-trip time and bandwidth of a TCP connection with different methods.
高级语言: C
项目地址: git://github.com/fishi0x01/tcp-metrics.git
创建时间: 2015-05-07T10:51:17Z
项目社区:https://github.com/fishi0x01/tcp-metrics

开源协议:

下载


tcp-metrics

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 socket.read() timestamp as the start time.

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

For detailed information concerning the techniques applied please check out http://fishi.devtail.com/weblog/8/

Usage

  1. Usage: tcp-metrics [OPTION...] DOMAIN PATH
  2.  
  3. Example: tcp-metrics yourdomain.com /your/resource
  4.  
  5. -a, --all Measure everything - option1 + option2 + rtt.
  6. -b, --bandwidth-method-A Measure the bandwidth with option 1, meaning the
  7. first socket.read() operations are skipped in
  8. order to avoid initial bursts and TCP slow-start
  9. to falsify the result.
  10. -c, --bandwidth-method-B Measure the bandwidth with option 2, meaning we
  11. measure beginning from the first socket.read()
  12. operation.
  13. -k, --skips=Skips Number of socket.read() Skips to avoid bursting
  14. and TCP slow-start to falsify the result - by
  15. default this value is 10. Note that a value of 0
  16. here would be the same as using measurement option
  17. 2 (-c).
  18. -m, --multi If set, for each round a different TCP socket is
  19. used. That way you might get a better overall
  20. estimate about an expected path between the client
  21. and the resource. Please note, that you need at
  22. least two measurement rounds for this option,
  23. since otherwise you will only use one TCP socket
  24. anyways...
  25. -n, --rounds=Rounds Number of repeated measurement Rounds. In order
  26. to get a fair estimate of the rtt, several rounds
  27. should be used. By default this value is 1.
  28. -p, --port=Port The Port the resource to measure is available at
  29. - default is 80.
  30. -r, --rtt Measure the rtt.
  31. -s, --size=Size Size of the receiver buffer - if not specified,
  32. by default a 2MB receiver buffer is used. Note
  33. that on each socket.read() the buffer is written
  34. from the start (it is just a dummy buffer...).
  35. Please note, that if this buffer is to small, the
  36. socket.read() operation does not have enough
  37. memory to store data to - thus a huge bottleneck
  38. in the application layer would occur.
  39. -t, --timeout=Timeout The socket Timeout in seconds - by default 2s.
  40. -v, --v Verbose - print subsequent estimates to stdout.
  41. -?, --help Give this help list
  42. --usage Give a short usage message
  43. -V, --version Print program version
  44.  
  45. Mandatory or optional arguments to long options are also mandatory or optional
  46. for any corresponding short options.