nuttx-apps/examples/tcpblaster
Adam Feuer 5a10c0e8e7 tcpblaster reporting and docs improvements
- changed incorrect Kb to correct KB in program output
- added readme

Squashed commit of the following:

commit b81821fd788eb08ffdf5a3084ab3d128788b75da
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:58:29 2020 -0800

    formatting improvements

commit a70e7109dd90522e6d7f680790d80c9328a8ba9c
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:58:13 2020 -0800

    formatting improvements

commit c11a5b3c8ee38fe080d121db87b7d26c0baf9f93
Author: Adam Feuer <adam@starcat.io>
Date:   Sun Feb 23 17:03:22 2020 -0800

    remove printf debugging statement

commit 94bcaa89d2df326ed2b560e935d344932c46607d
Merge: fddb3ee4 d6604922
Author: Adam Feuer <adam@starcat.io>
Date:   Sun Feb 23 16:58:35 2020 -0800

    Merge branch 'master' into feature/tcpblaster-improvements

commit fddb3ee4ee9ba185f0f4e01c205620bbcb02e40e
Author: Adam Feuer <adam@starcat.io>
Date:   Sat Feb 22 16:29:51 2020 -0800

    fixed typo

commit d398d6f3803d81e849814548be9671ac33f08168
Author: Adam Feuer <adam@starcat.io>
Date:   Sat Feb 22 16:29:04 2020 -0800

    logging now has timestamp; improved configuration
2020-02-24 20:09:35 -06:00
..
.gitignore Squashed commit of the following: 2018-07-05 16:03:54 -06:00
Kconfig tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00
Make.defs apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Makefile tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00
README.txt tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00
tcpblaster_client.c tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00
tcpblaster_cmdline.c apps/examples/tcpblaster: Fix compile errors in loopback mode. 2020-02-10 21:05:49 +01:00
tcpblaster_host.c apps/examples/tcpblaster: Fix several problems with the host is the client and the target in the server. Basic problem was that the host did not know the IP address of the target server due to several bugs and build issues that only seemed to affect this configuration. 2019-12-08 17:11:07 -06:00
tcpblaster_netinit.c Squashed commit of the following: 2018-07-05 16:03:54 -06:00
tcpblaster_server.c tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00
tcpblaster_target1.c Unify the void cast usage 2020-01-02 23:21:01 +08:00
tcpblaster_target2.c Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
tcpblaster.h tcpblaster reporting and docs improvements 2020-02-24 20:09:35 -06:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

tcpblaster Performance Test Example
===================================

To set up, do `make menuconfig` and select the Apps > Examples > tcpblaster. 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).