Commit graph

117 commits

Author SHA1 Message Date
Joakim Frostegård
5d40954936 aquatic_ws: deserialize InMessage with simd-json for performance
From 18% to 13% CPU time during load test run.

Criterion benchmark of deserialization got about 90% improvement.
2020-08-11 06:32:51 +02:00
Joakim Frostegård
99724c7e5d aquatic_ws: add bench for InMessage::from_ws_message, take ws msg by ref 2020-08-11 05:36:29 +02:00
Joakim Frostegård
1a3ab54b3f aquatic_ws: when removing connection, reregister from poll 2020-08-10 03:51:08 +02:00
Joakim Frostegård
2d3761fee2 impl Copy for LogLevel, remove some cloning 2020-08-09 00:27:05 +02:00
Joakim Frostegård
0637f83daa aquatic_ws: rewrite failing serialization, add tests
Use different approach to action fields and info_hash vec, fixing
failing tests
2020-08-09 00:26:26 +02:00
Joakim Frostegård
6f618bb013 aquatic_ws_load_test: get answer sending to work with wt-tracker 2020-08-03 07:02:42 +02:00
Joakim Frostegård
8d58f8bb70 init logger in aquatic_cli_helpers crate 2020-08-02 21:21:58 +02:00
Joakim Frostegård
561cc3db55 fix more clippy warnings 2020-08-02 00:36:56 +02:00
Joakim Frostegård
aabdf76a5d aquatic_ws: fix some clippy warnings 2020-08-02 00:07:12 +02:00
Joakim Frostegård
716228c1b1 aquatic_ws: don't run log::error on closing closed connection 2020-08-01 06:09:42 +02:00
Joakim Frostegård
6a9e1f5e72 aquatic_ws: keep valid_until up to date in established connections 2020-08-01 04:27:31 +02:00
Joakim Frostegård
0f072244ab WIP: aquatic_ws: use microseconds for poll timeout, remove unwrap 2020-08-01 03:44:29 +02:00
Joakim Frostegård
a5108f813d WIP: aquatic_ws: add half-crappy load test, fix infinite loop bug 2020-08-01 03:35:00 +02:00
Joakim Frostegård
c7be84a61e aquatic_ws: upgrade to tungstenite 0.11 2020-08-01 00:13:38 +02:00
Joakim Frostegård
809d16919d aquatic_ws: convert ipv4-mapped ipv6 addresses to ipv4 (for state split) 2020-08-01 00:08:18 +02:00
Joakim Frostegård
d5de57b45f aquatic_ws: replace flume with crossbeam-channel
This improved performance in aquatic_http
2020-07-31 01:47:45 +02:00
Joakim Frostegård
f2db4a43b9 Update lots of dependencies 2020-07-21 00:58:56 +02:00
Joakim Frostegård
be18fb2655 aquatic_ws network connection: improve documentation 2020-05-30 15:04:49 +02:00
Joakim Frostegård
f52de1ea44 aquatic_ws: log to stderr instead of stdout 2020-05-26 19:23:14 +02:00
Joakim Frostegård
7dd02a03d3 aquatic_ws announce handler: improve variable naming and scoping 2020-05-26 19:17:37 +02:00
Joakim Frostegård
2f13e1e1a8 rename crate "cli_helpers" to "aquatic_cli_helpers" 2020-05-25 19:27:22 +02:00
Joakim Frostegård
abc0034a45 aquatic_ws: don't send peer its own offer 2020-05-25 19:01:10 +02:00
Joakim Frostegård
689a874cbe aquatic_ws: use debug log level for "read message" and "sent message" 2020-05-25 18:51:04 +02:00
Joakim Frostegård
1ec4745f45 aquatic_ws: use socket2 instead of net2 2020-05-25 18:24:36 +02:00
Joakim Frostegård
5af9ae4ede aquatic_ws: move some config vars to new substruct ProtocolConfig 2020-05-25 17:59:52 +02:00
Joakim Frostegård
e3b7af2c00 aquatic_ws: log error messages on channel send failure 2020-05-23 20:41:20 +02:00
Joakim Frostegård
ba060c539b aquatic_ws executable: remove thread log settings, add comment 2020-05-23 20:33:16 +02:00
Joakim Frostegård
66216657ec aquatic_ws: name worker threads
Note: simplelog doesn't seem to pick up thread names, but
this commit is good anyway, since they can be displayed
in e.g. htop on Linux
2020-05-23 20:27:31 +02:00
Joakim Frostegård
bc8916dce4 aquatic_ws: add logging with level configured by config file 2020-05-23 20:16:56 +02:00
Joakim Frostegård
b9ee290ca0 aquatic_ws: add more anyhow error context annotations 2020-05-23 17:15:11 +02:00
Joakim Frostegård
7c33358254 aquatic_ws: polling: don't check if event readable
We only register interest in readable events so this should be OK
2020-05-23 17:06:46 +02:00
Joakim Frostegård
f3bdb6bc2a aquatic_ws: privilege dropping; cli_helpers: show error context 2020-05-23 17:02:52 +02:00
Joakim Frostegård
a596ee155a aquatic_ws: wait for and quit on socket bind errors in workers 2020-05-23 16:38:31 +02:00
Joakim Frostegård
d4bcc14c82 aquatic_ws: add setting Config.ipv6_only 2020-05-23 15:40:56 +02:00
Joakim Frostegård
416d61a2b2 aquatic_ws: split torrent state by ipv4/ipv6 2020-05-23 15:15:01 +02:00
Joakim Frostegård
7430c23ccc aquatic_ws: add simple_logger for debugging, need better solution 2020-05-23 14:53:29 +02:00
Joakim Frostegård
23e0e0bcd0 aquatic_ws: add log::trace statements for message read and write 2020-05-23 14:44:42 +02:00
Joakim Frostegård
a30335730b aquatic_ws: add settings for max ws message sizes, set low defaults 2020-05-23 14:44:03 +02:00
Joakim Frostegård
0f6d6d4b21 aquatic_ws: use log crate for debug error messages 2020-05-23 14:24:26 +02:00
Joakim Frostegård
572aa632b6 aquatic_ws: don't handle connection closed same as other errors 2020-05-23 14:17:03 +02:00
Joakim Frostegård
526faa9aab cli_helpers: use anyhow in app fn; aquatic_ws: reorganize error handling 2020-05-23 14:05:50 +02:00
Joakim Frostegård
b42ff9a23b aquatic_ws: remove DebugCallback and lots of debug output
Some error messages are still printed, though
2020-05-18 13:01:48 +02:00
Joakim Frostegård
1a2432733e aquatic_ws: in scrape handler, limit HashMap preallocation 2020-05-17 21:24:29 +02:00
Joakim Frostegård
4216452fc9 aquatic_udp, aquatic_ws: bind to 0.0.0.0:3000 by default 2020-05-17 11:58:00 +02:00
Joakim Frostegård
7da7d79d90 aquatic_ws: remove no longer valid comment 2020-05-15 17:06:10 +02:00
Joakim Frostegård
ad925c07f1 aquatic_ws: comment out privilege settings since they're not implemented 2020-05-15 17:01:15 +02:00
Joakim Frostegård
0eb4039b5e aquatic_ws: network: use HandshakeMachine::new in Connection 2020-05-15 16:16:03 +02:00
Joakim Frostegård
420dcbc717 aquatic_ws: network: rename common.rs to connection.rs 2020-05-15 16:15:39 +02:00
Joakim Frostegård
73c90622c7 aquatic_ws network: make HandshakeMachine non-public 2020-05-15 16:12:56 +02:00
Joakim Frostegård
cb66364fa5 aquatic_ws: save peer even if AnnounceRequest.bytes_left is None 2020-05-15 16:02:49 +02:00