Commit graph

1983 commits

Author SHA1 Message Date
Ivan Vilata-i-Balaguer
3a9b2dd932 Show progress of direct sent messages in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
7b0834e3b8 Change format of progress report in network stress test
Printing on stdout with a different format makes progress bars easier to filter out.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
0e9bcff2c8 Better progress reporting in network stress test shutdown 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
663cd82432 Show progress of network stress test operations 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
ac3dbe9160 Wait longer for direct receive in network stress test
Using the new executor made thing a little slower.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
84035ae658 Stop seed node after peer nodes in network stress test
Probably not really needed.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
2881a3dd63 Indicate when nodes are being stopped in the network stress test
It may help distinguish errors derived from forcibly stopping nodes (e.g. after a timeout).
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
da5b59b06b Set a `UserThread` executor in network stress test
That makes it more stable against ``ConcurrentModificationException`` (see #443), but may need to allow more open files for the process.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
fa461f23e8 Wait 2 seconds per peer for preliminary data and bootstrap 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
c4bb180dbf Show exceptions after network stress test run as main class 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
0fc8a1b5c0 Add main function to run an individual network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
4b75235f33 Split network stress tests in direct and mailbox
Now they can be run independently.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
c67f724e0f Wait for preliminary data and bootstrap while setting up network stress tests
This should be common for the different tests.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
ad6c0599f6 Wait for preliminary data and bootstrap to setup of network stress tests 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
444f9d90b8 Example restarting of peer in network stress test
This mechanism will be used for the mailbox send test.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
4a264dbdc7 Make use localhost a field in network stress test
It will help with the recreation of peers for mailbox send test.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
39c9512673 Rename method to get seed node address for network stress test
This one better conveys the intention of providing a new address each time it is called.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
5a4886ffa4 Keep track of peer ports and seed nodes repo
It will be useful when recreating nodes for mailbox send test.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
7351363830 Check optional value in keyring getter, hint nullable 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
ab4491d956 Draft and describe loop for mailbox send test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
f74d88cb33 Factor out peer node creation in network stress test
This will be useful later when stopping and restarting peer nodes in mailbox send test.  I added a getter to ``P2PService`` to get its public keyring.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
9ad4f371b2 Split long line 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
0599c820be Show min/max/avg send send delay in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
6ab5daf1c1 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.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
d9f00e6627 Wait more for message reception in network stress test
If we wait for too little there are lots of connection refused errors when stopping nodes.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
9e61f1f3db Some comments on peer creation in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
acb31003ed Set maximum connections to seed node in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
a9efa4ec15 Print network stress test steps to help locating the source of warnings 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
8eefecdc9c Report pending latch counts on network stress test timeouts 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
97e6b942d3 Customize direct message count per peer from environment variable 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
e7e45f497e Use plain system milliseconds instead of instants and durations
For consistency with the rest of the stress test.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
987b28e4e2 Use parameter-based timeouts for direct messages in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
ec216a8702 Fix direct message loop in network stress test
The logic was broken and all sends where packed in the same (min delay, max delay) period. Now a variable ensures that the random delay gets added to the previous time.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
6c188e35fa Send direct messages in network stress test in a loop
Actually each peer runs a loop to setup messages to be sent in the future with a random delay.

This is an actual stress test for the first time. Maybe the timeouts should be adjusted accordingly.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
c8e3c6d11a Random delay when sending direct message in network stress test
The delay is always longer than the one that triggers throttling.  It makes not much sense for a single sending, but it will within a loop.

Also made some ``Connection`` throttle constants package-private so they can be accessed by tests.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
da145435a1 Keep destination peer address in a variable 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
109a71cd7f Minor changes to comments and printed messages 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
53901ba798 Configure all peers once to receive direct messages in network stress test
Instead on adding a listener once per selected random destination peer.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
3e34d23b9e Convert print instruction to use helper method 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
9505a28ccc Print message receiving and sending times in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
b8d49e44b6 Send direct messages from all peers to random ones in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
97722a6ecd Check direct message receiving side in network stress test 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
30dd7f0f88 Change content of network stress test messages
Otherwise the destination node can have a hard time checking its content.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
2d9ed390f0 Partial direct send/receive test between two peers in network stress test
Still need to implement checks on the receiving side.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
9f728c19c3 Check minimum peers in network stress test
In preparation for direct send message test.
2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
a99c0ffc07 Keep Tor hidden service key when preserving network stress test data 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
a9973808b2 Make the number of peers in network stress test selectable with environment variable 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
bfbda2c38e Turn detailed logging of network stress test into a constant 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
d439058392 Check that network stress test data directory variable is not empty 2016-05-17 09:13:28 +02:00
Ivan Vilata-i-Balaguer
f100ef6384 Only keep peer keys when reusing network stress test directory 2016-05-17 09:13:28 +02:00