mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #3547 from haydenroche5/benchmarking_tput
Fix RX/TX throughput reporting in example server.
This commit is contained in:
@ -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)
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user