bbperf 0.0.6__tar.gz → 0.0.7__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.
Files changed (29) hide show
  1. {bbperf-0.0.6 → bbperf-0.0.7}/PKG-INFO +1 -1
  2. bbperf-0.0.7/bbperf.service +14 -0
  3. {bbperf-0.0.6 → bbperf-0.0.7}/pyproject.toml +1 -1
  4. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/data_receiver_thread.py +11 -1
  5. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/data_sender_thread.py +7 -3
  6. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/util.py +4 -0
  7. {bbperf-0.0.6 → bbperf-0.0.7}/.gitignore +0 -0
  8. {bbperf-0.0.6 → bbperf-0.0.7}/DEPLOY.txt +0 -0
  9. {bbperf-0.0.6 → bbperf-0.0.7}/LICENSE +0 -0
  10. {bbperf-0.0.6 → bbperf-0.0.7}/README.md +0 -0
  11. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/.gitignore +0 -0
  12. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/__init__.py +0 -0
  13. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/bbperf.py +0 -0
  14. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/client.py +0 -0
  15. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/const.py +0 -0
  16. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/control_receiver_thread.py +0 -0
  17. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/data_sample_evaluator_class.py +0 -0
  18. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/data_udp_ping_sender_thread.py +0 -0
  19. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/exceptions.py +0 -0
  20. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/graph.py +0 -0
  21. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/json_output_class.py +0 -0
  22. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/output.py +0 -0
  23. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/run_mode_manager_class.py +0 -0
  24. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/server.py +0 -0
  25. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/tcp-graph.gp +0 -0
  26. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/tcp_control_connection_class.py +0 -0
  27. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/udp-graph.gp +0 -0
  28. {bbperf-0.0.6 → bbperf-0.0.7}/src/bbperf/udp_rate_manager_class.py +0 -0
  29. {bbperf-0.0.6 → bbperf-0.0.7}/tests/run_test.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbperf
3
- Version: 0.0.6
3
+ Version: 0.0.7
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
+
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bbperf"
7
- version = "0.0.6"
7
+ version = "0.0.7"
8
8
  authors = [
9
9
  { name="Mike Freemon", email="mfreemon@cloudflare.com" },
10
10
  ]
@@ -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
- pass
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)
@@ -121,8 +122,11 @@ def run(args, stdout_queue, data_sock, peer_addr, shared_run_mode, shared_udp_se
121
122
  continue
122
123
 
123
124
  except socket.timeout:
124
- # we did not send, loop back up and try again
125
- continue
125
+ # we did not send
126
+ # the timeout value here is 20 seconds, so that is end of days -- kill everything
127
+ error_msg = "FATAL: data_sender_thread: socket timeout"
128
+ stdout_queue.put(error_msg)
129
+ raise Exception(error_msg)
126
130
 
127
131
  total_send_counter += 1
128
132
  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