mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 11:44:38 +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;
|
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,
|
static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||||
int dtlsUDP, int dtlsSCTP, int block, size_t throughput, int useX25519,
|
int dtlsUDP, int dtlsSCTP, int block, size_t throughput, int useX25519,
|
||||||
int useX448, int exitWithRet)
|
int useX448, int exitWithRet)
|
||||||
|
@@ -463,8 +463,8 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block,
|
|||||||
#else
|
#else
|
||||||
(int)throughput,
|
(int)throughput,
|
||||||
#endif
|
#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=$!
|
server_pid=$!
|
||||||
fi
|
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..."
|
echo "Waiting for server_ready file..."
|
||||||
while [ ! -s /tmp/wolfssl_server_ready -a "$counter" -lt 20 ]; do
|
while [ ! -s /tmp/wolfssl_server_ready -a "$counter" -lt 20 ]; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
Reference in New Issue
Block a user