diff --git a/examples/client/client.c b/examples/client/client.c index dc67f866d..02d34b878 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -522,7 +522,7 @@ static int ClientBenchmarkConnections(WOLFSSL_CTX* ctx, char* host, word16 port, return EXIT_SUCCESS; } -/* Measures throughput in kbps. Throughput = number of bytes */ +/* Measures throughput in mbps. Throughput = number of bytes */ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, int dtlsUDP, int dtlsSCTP, int block, size_t throughput, int useX25519, int useX448, int exitWithRet) diff --git a/examples/server/server.c b/examples/server/server.c index 99e3b791c..e96cea9ba 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -463,8 +463,8 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block, #else (int)throughput, #endif - tx_time * 1000, throughput / tx_time / 1024 / 1024, - rx_time * 1000, throughput / rx_time / 1024 / 1024 + rx_time * 1000, throughput / rx_time / 1024 / 1024, + tx_time * 1000, throughput / tx_time / 1024 / 1024 ); } diff --git a/scripts/benchmark.test b/scripts/benchmark.test index 435f2fd6e..9bff8c244 100755 --- a/scripts/benchmark.test +++ b/scripts/benchmark.test @@ -67,7 +67,9 @@ then server_pid=$! fi - +# NOTE: We sleep for 2 seconds below. If timing the execution of this script +# with "time", bear in mind that those 2 seconds will be reflected in +# the "real" time. echo "Waiting for server_ready file..." while [ ! -s /tmp/wolfssl_server_ready -a "$counter" -lt 20 ]; do sleep 0.1