apps/exmples/tcpblaster: Select CONFIG_LIBC_FLOATINGPOINT automatically. Units in output are wrong: Not Kbps bus Kb/Sec.

This commit is contained in:
Gregory Nutt 2018-09-10 13:13:56 -06:00
parent 25c2756a82
commit 0d98f640b4
3 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@
config EXAMPLES_TCPBLASTER
tristate "TCP Performance Test"
default n
select LIBC_FLOATINGPOINT
depends on NET_TCP
---help---
Enable the network test example

View File

@ -220,7 +220,7 @@ void tcpblaster_client(void)
fkbrecvd = (float)sendtotal / 1024.0;
felapsed = (float)elapsed.tv_sec + (float)elapsed.tv_nsec / 1000000000.0;
printf("Sent %d buffers: %7.1f Kb (avg %5.1f Kb) in %6.2f Sec (%7.1f Kbps)\n",
printf("Sent %d buffers: %7.1f Kb (avg %5.1f Kb) in %6.2f Sec (%7.1f Kb/Sec)\n",
sendcount, fkbrecvd, fkbrecvd/sendcount, felapsed, fkbrecvd/felapsed);
if (partials > 0)

View File

@ -249,7 +249,7 @@ void tcpblaster_server(void)
fkbsent = (float)recvtotal / 1024.0;
felapsed = (float)elapsed.tv_sec + (float)elapsed.tv_nsec / 1000000000.0;
printf("Received %d buffers: %7.1f Kb (avg %5.1f Kb) in %6.2f Sec (%7.1f Kbps)\n",
printf("Received %d buffers: %7.1f Kb (avg %5.1f Kb) in %6.2f Sec (%7.1f Kb/Sec)\n",
recvcount, fkbsent, fkbsent/recvcount, felapsed, fkbsent/felapsed);
recvcount = 0;