bbperf 0.0.6__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bbperf-0.0.6 → bbperf-0.0.8}/PKG-INFO +1 -1
- bbperf-0.0.8/bbperf.service +14 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/pyproject.toml +1 -1
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/data_receiver_thread.py +11 -1
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/data_sender_thread.py +14 -3
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/util.py +4 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/.gitignore +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/DEPLOY.txt +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/LICENSE +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/README.md +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/.gitignore +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/__init__.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/bbperf.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/client.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/const.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/control_receiver_thread.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/data_sample_evaluator_class.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/data_udp_ping_sender_thread.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/exceptions.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/graph.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/json_output_class.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/output.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/run_mode_manager_class.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/server.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/tcp-graph.gp +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/tcp_control_connection_class.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/udp-graph.gp +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/src/bbperf/udp_rate_manager_class.py +0 -0
- {bbperf-0.0.6 → bbperf-0.0.8}/tests/run_test.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bbperf
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: An end-to-end performance and bufferbloat measurement tool
|
|
5
5
|
Project-URL: Homepage, https://github.com/cloudflare/bbperf
|
|
6
6
|
Project-URL: Issues, https://github.com/cloudflare/bbperf/issues
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=bbperf
|
|
3
|
+
After=syslog.target network.target
|
|
4
|
+
|
|
5
|
+
[Service]
|
|
6
|
+
Type=simple
|
|
7
|
+
User=mfreemon
|
|
8
|
+
Environment=PYTHONUNBUFFERED=1
|
|
9
|
+
ExecStart=/home/mfreemon/bbperf-dev-venv/bin/bbperf -s
|
|
10
|
+
Restart=always
|
|
11
|
+
|
|
12
|
+
[Install]
|
|
13
|
+
WantedBy=multi-user.target
|
|
14
|
+
|
|
@@ -27,6 +27,9 @@ def run(args, stdout_queue, control_conn, data_sock, peer_addr):
|
|
|
27
27
|
interval_pkts_received = 0
|
|
28
28
|
interval_bytes_received = 0
|
|
29
29
|
|
|
30
|
+
socket_timeout_timer_active = False
|
|
31
|
+
socket_timeout_timer_start_time = None
|
|
32
|
+
|
|
30
33
|
# do until end of test duration
|
|
31
34
|
# we will not get a connection close with udp
|
|
32
35
|
while True:
|
|
@@ -64,8 +67,15 @@ def run(args, stdout_queue, control_conn, data_sock, peer_addr):
|
|
|
64
67
|
# exit process
|
|
65
68
|
break
|
|
66
69
|
|
|
70
|
+
socket_timeout_timer_active = False
|
|
71
|
+
|
|
67
72
|
except socket.timeout:
|
|
68
|
-
|
|
73
|
+
if socket_timeout_timer_active:
|
|
74
|
+
if (time.time() - socket_timeout_timer_start_time) > const.SOCKET_TIMEOUT_SEC:
|
|
75
|
+
raise Exception("FATAL: data_receiver_thread: timeout during data socket read")
|
|
76
|
+
else:
|
|
77
|
+
socket_timeout_timer_active = True
|
|
78
|
+
socket_timeout_timer_start_time = time.time()
|
|
69
79
|
|
|
70
80
|
if args.udp and num_bytes_read == len(const.UDP_STOP_MSG) and (bytes_read.decode() == const.UDP_STOP_MSG):
|
|
71
81
|
if args.verbosity:
|
|
@@ -16,8 +16,9 @@ def run(args, stdout_queue, data_sock, peer_addr, shared_run_mode, shared_udp_se
|
|
|
16
16
|
|
|
17
17
|
peer_addr_for_udp = peer_addr
|
|
18
18
|
|
|
19
|
+
# this (data sender) is running on server (aka reverse flow)
|
|
20
|
+
# for udp, we have to wait for a ping message so we know where to send the data packets
|
|
19
21
|
if args.udp and (peer_addr_for_udp is None):
|
|
20
|
-
# for udp, we have to wait for a ping message so we know where to send the data packets
|
|
21
22
|
while True:
|
|
22
23
|
# blocking
|
|
23
24
|
bytes_read, pkt_from_addr = data_sock.recvfrom(const.BUFSZ)
|
|
@@ -52,10 +53,17 @@ def run(args, stdout_queue, data_sock, peer_addr, shared_run_mode, shared_udp_se
|
|
|
52
53
|
|
|
53
54
|
total_send_counter = 1
|
|
54
55
|
|
|
56
|
+
calibration_start_time = time.time()
|
|
57
|
+
|
|
55
58
|
while True:
|
|
56
59
|
curr_time_sec = time.time()
|
|
57
60
|
|
|
58
61
|
if (shared_run_mode.value == const.RUN_MODE_CALIBRATING):
|
|
62
|
+
if curr_time_sec > (calibration_start_time + const.MAX_DURATION_CALIBRATION_TIME_SEC):
|
|
63
|
+
error_msg = "FATAL: data_sender_thread: time in calibration exceeded max allowed"
|
|
64
|
+
stdout_queue.put(error_msg)
|
|
65
|
+
raise Exception(error_msg)
|
|
66
|
+
|
|
59
67
|
is_calibrated = False
|
|
60
68
|
else:
|
|
61
69
|
is_calibrated = True
|
|
@@ -121,8 +129,11 @@ def run(args, stdout_queue, data_sock, peer_addr, shared_run_mode, shared_udp_se
|
|
|
121
129
|
continue
|
|
122
130
|
|
|
123
131
|
except socket.timeout:
|
|
124
|
-
# we did not send
|
|
125
|
-
|
|
132
|
+
# we did not send
|
|
133
|
+
# the timeout value here is 20 seconds, so that is end of days -- kill everything
|
|
134
|
+
error_msg = "FATAL: data_sender_thread: socket timeout"
|
|
135
|
+
stdout_queue.put(error_msg)
|
|
136
|
+
raise Exception(error_msg)
|
|
126
137
|
|
|
127
138
|
total_send_counter += 1
|
|
128
139
|
accum_send_count += 1
|
|
@@ -58,6 +58,10 @@ def threads_are_running(thread_list):
|
|
|
58
58
|
for t in thread_list:
|
|
59
59
|
if t.is_alive():
|
|
60
60
|
any_running = True
|
|
61
|
+
else:
|
|
62
|
+
if t.exitcode != 0:
|
|
63
|
+
# thread existing abnormally -- kill everything and go home
|
|
64
|
+
raise Exception("FATAL: one of the subprocesses existed abnormally, name: {}, exitcode: {}".format(t.name, t.exitcode))
|
|
61
65
|
|
|
62
66
|
return any_running
|
|
63
67
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|