You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/test_data_blaster/README.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,28 @@
1
1
# Test Data Blaster
2
2
3
3
The Test Data Blaster (T-DB) is a set of binaries that performs both TCP and UDP distributed testing (currently the UDP portion is not implemented). There are multiple binaries in the suite:
4
-
- Data sender / receiver (DSR), a TCP and (future) UDP version
5
-
-Statistics and logging monitor, a C++ and (future) Python version
4
+
- Data sender / receiver (DSR), a TCP and (future) UDP version (C++ only)
5
+
-Monitor, a statistics and logging display (both C++ and Python versions)
6
6
7
7
Multiple data sender / receiver (DSR) instances are running at the same time (at least two must be running for sending and receiving data). Each TCP DSR instance can be configured for multiple TCP connectors and multiple TCP acceptors at the same time. Each (future) UDP DSR can be configured for multiple senders and receivers at the same time.
8
8
9
-
A single instance of the monitor shows statistics from the DSR instances. The monitor is also responsible for shutting down the DSRs. The same monitor instance can be running for both TCP and UDP (the log messages sent to the monitor from the DSRs specify whether the test data is being sent over TCP or UDP).
9
+
A single instance of the monitor (either the C++ or Python version) shows statistics from the DSR instances. The monitor is also responsible for shutting down the DSRs. The same monitor instance can be running for both TCP and UDP DSRs (the log messages sent to the monitor from the DSRs specify whether the test data is being sent over TCP or UDP).
10
10
11
-
While the DSRs are written in C++, there is a monitor app written in both C++ and Python version. The monitor message definitions are text only, so binary endianness is not a factor.
11
+
The message definitions between the DSRs and the monitor are text only, so binary endianness is not a factor, and will run on any platform. The data flowing between DSRs is marshalled and unmarshalled as needed by the DSRs.
12
12
13
13
## Usage
14
14
15
-
(Fill in command line usage here - note that typically the monitor is started first.)
15
+
The monitor process is typically started first, otherwise monitor log messages may be lost.
16
+
17
+
(Fill in command line usage here.)
16
18
17
19
(Fill in details about expected output.)
18
20
21
+
If the connection to the monitor process from a DSR is broken, (fill in details about display behavior, it will be different between the C++ and Python versions).
22
+
19
23
(Fill in details about how to trigger shutdown through the monitor.)
20
24
25
+
21
26
## Building Test Data Blaster
22
27
23
28
All of the C++ components can be built using CMake.
@@ -28,20 +33,24 @@ The Python monitor is built by ...
28
33
29
34
## Internals and Design
30
35
31
-
Having separate code bases (and executables) for the TCP and UDP DSRs simplifies the command line parameters as well as the internal logic. There is no specific technical reason why the DSR couldn't handle both TCP and UDP, but the DSR command line is already complicated enough.
36
+
Having separate code bases (and executables) for the TCP and UDP DSRs simplifies the command line parameters as well as the internal logic. There is no specific technical reason why the DSR couldn't handle both TCP and UDP, but the TCP DSR command line has quite a bit of complexity without adding UDP options.
32
37
33
38
There is (obviously) common code between all of the T-DB C++ components, some from the `shared_test` directory (i.e. code that is shared with the Chops Net IP unit tests), and some factored out in this (`test_data_blaster`) directory.
34
39
35
40
### Monitor Process
36
41
37
-
The T-DB Monitor is run as a TCP acceptor (server) only. It accepts TCP connections on one port, each connection corresponding to one instance of either a TCP DSR or a UDP DSR.
42
+
The T-DB Monitor is run as a TCP acceptor (server) only. It accepts TCP connections on one port, each connection corresponding to one instance of either a TCP DSR or a (future) UDP DSR.
38
43
39
44
There are no "begin" or "end" data messages that the monitor has to process, a new incoming TCP connection is the indication that a new DSR instance has started, and the end of the TCP connection is the indication that the DSR instance has ended.
40
45
41
46
The DSR will not send a monitor log message for every test message sent between DSR instances. A "modulo" command line parameter specifies how often a monitor log message will be sent (for each test data set). (A modulo of 1 would generate one monitor log message per test data set message.)
42
47
43
48
The monitor process will notify all DSR processes to shutdown by sending a shutdown message through each monitor connection. The monitor process will have a user initiated mechanism to send the shutdown messages and end the monitor process.
44
49
50
+
When shutdown is initiated the monitor process waits for (fill in details) seconds to ensure that the shutdown message is sent to all DSR connections.
51
+
52
+
(Note - Roxanne has suggested adding a two-way shutdown message sequence. A "shutdown requested" message would be sent to all DSRs, and a "shutdown response" message would be sent back to the monitor be each DSR. This allows quicker shutdown by the monitor process, since it will know exactly when the last DSR has shut down.)
53
+
45
54
#### Monitor Log Message Contents
46
55
47
56
Each message from the DSRs to the monitor has the following fields:
@@ -67,6 +76,8 @@ The shutdown message is the only message sent from the monitor to the DSRs and c
67
76
68
77
These three characters are a lower case "s" (short for shutdown), a null character and a newline character.
69
78
79
+
(Proposed message, from Roxanne: - the DSR sends back a shutdown response message consisting of three characters: "r\0\n".)
80
+
70
81
### TCP Data Sender Receiver
71
82
72
83
Each DSR instance can start multiple TCP connectors and multiple TCP acceptors as provided via the command line arguments.
0 commit comments