-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathquack.py
executable file
·25 lines (20 loc) · 914 Bytes
/
quack.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
"""
Measure one-way UDP packet latency between two hosts.
Latency is calculated using a hardware timer module that both client and
server can read from.
One or more hosts run the script in client mode.
Client mode simply sends packets to the designated target address.
(If you want to have more than one client, they must all be started at the
same time.)
The other host runs the script in server mode.
Server mode receives packets from all the transmitting clients and saves them
to a separate file for each client. The file contains a plain text list of
packet number/round-trip latency (in milliseconds) tuples for each packet
received, one per line. The first line of the file specifies the number of
packets sent, enabling calculation of the number of packets that got lost along
the way.
"""
import common
import onewaymeasurement
common.main(onewaymeasurement.OneWayMeasurement)