nuttx-apps/examples/tcpblaster
Petro Karashchenko f9baa422c1 style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-09 10:37:33 +08:00
..
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 15:56:35 +01:00
Kconfig Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE 2020-03-27 02:43:11 -05:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile style: unify path to files in comment section 2022-03-09 10:37:33 +08:00
README.md Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
tcpblaster_client.c apps: remove space befone newline in logs 2021-12-27 20:52:08 -06:00
tcpblaster_cmdline.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster_host.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster_netinit.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster_server.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster_target1.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster_target2.c examples: fix relative path CI error 2021-06-16 09:03:06 -05:00
tcpblaster.h include: fix double include pre-processor guards 2022-01-16 17:36:21 +08:00

Examples / tcpblaster TCP Performance Test

To set up, do make menuconfig and select the AppsExamplestcpblaster. By default, nuttx will the be the client which sends data; and the host computer (Linux, macOS, or Windows) will be the server.

Set up networking so the nuttx computer can ping the host, and the host can ping nuttx. Now you are ready to run the test.

On host:

$ ./tcpserver
Binding to IPv4 Address: 00000000
server: Accepting connections on port 5471

On nuttx:

nsh> tcpclient
Connecting to IPv4 Address: 0100000a
client: Connected
[2014-07-31 00:16:15.000] 0: Sent 200 4096-byte buffers:    800.0 KB (avg   4.0 KB) in   0.18 seconds ( 4444.4 KB/second)

Now on the host you should see something like:

$ ./tcpserver
Binding to IPv4 Address: 00000000
server: Accepting connections on port 5471
server: Connection accepted -- receiving
[2020-02-22 16:17:07.000] 0: Received 200 buffers:   502.9 KB (buffer average size:   2.5 KB) in   0.12 seconds ( 4194.8 KB/second)
[2020-02-22 16:17:07.000] 1: Received 200 buffers:   393.1 KB (buffer average size:   2.0 KB) in   0.09 seconds ( 4299.4 KB/second)

This will tell you the link speed in KB/sec kilobytes per second. If you want kilobits, multiply by 8.

You can use the make menuconfig to reverse the setup, and have nuttx be the server, and the host be the client. If you do that, start the server first (nuttx), then start the client (host).