Report ratio to max receive timeout in network stress test

My computer is able to handle 50 messages per each of 20 peers with a delay ratio around 3.  With 100 messages or 50 peers, receiving times out even if we wait 10 times the ideal max timeout.
This commit is contained in:
Ivan Vilata-i-Balaguer 2016-05-09 10:54:35 +02:00
parent d9f00e6627
commit 6ab5daf1c1

View File

@ -270,8 +270,9 @@ public class NetworkStressTest {
// Wait for peers to complete receiving. We are generous here.
assertLatch("timed out while receiving direct messages",
receivedDirectLatch, 10 * idealMaxDirectDelay, TimeUnit.MILLISECONDS);
print("receiving %d direct messages per peer took %ss", directCount,
(System.currentTimeMillis() - sendStartMillis)/1000.0);
final long recvMillis = System.currentTimeMillis() - sendStartMillis;
print("receiving %d direct messages per peer took %ss (%.2f x ideal max)",
directCount, recvMillis/1000.0, recvMillis/(float)idealMaxDirectDelay);
// Wait for peers to complete sending.
// This should be nearly instantaneous after waiting for reception is completed.
assertLatch("timed out while sending direct messages",