James Wilson
e7d15d03b3
Tweak logs and attempt to avoid races around removing nodes ( #504 )
...
* Tweak logs and attempt to avoid races around removing nodes
* wrapping_add in assign_id
2022-10-10 13:12:07 +01:00
Alexandru Vasile
09b44ad00f
Expose node's IP address via feed ( #491 )
...
* Fix typos
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* core: Extend `feed::LocatedNode` message with optional IP address
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* core: Expose IpAddr from locator task
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* core: Expose CLI flag to handle IP
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Consider Option<String> for IP address
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* core: Add node's IP directly to the Node's details
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust testing and serialize node's ip address
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* frontend: Propagate IP address for deserialization purposes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* core: Clarify the CLI flag documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2022-08-17 15:35:36 +03:00
James Wilson
ad21d0cff0
Remove unused AuthoritySet bits. Fix soak test warnings ( #489 )
2022-08-08 11:13:26 +01:00
Renjie Cai
65ad10b715
support https and wss core url in shard's ws client ( #488 )
...
* support https and wss core url in shard's ws client
* fmt
* small fix
2022-08-04 17:01:32 +01:00
Koute
45878f9876
Add per-chain aggregate software/hardware telemetry ( #464 )
...
* Add per-chain aggregate software/hardware telemetry
* Fix tests' compilation
* Add extra comments for the `Counter` struct
* Replace the boolean argument with an enum
* Rename `replace_hwbench` to `update_hwbench`
* Move `Counter` into a separate file
* Move `ChainStatsCollator` to `chain_stats.rs`
* Fix incorrect key on the unknown table
* Improve types for the stats component; get rid of `any`
2022-04-27 18:44:34 +09:00
James Wilson
17432d712f
Remove broken "Consensus" tab from UI and related code ( #434 )
...
* Remove consensus-tab related stuff, and unused messages, from the telemetry backend
* also remove AfgAuthoritySet feed message, and handle same from node
* Blat everything consensus related that I can find in the UI
* cargo fmt
* README: had -> has
Co-authored-by: David <dvdplm@gmail.com >
Co-authored-by: David <dvdplm@gmail.com >
2021-11-25 12:34:36 +00:00
Dan Shields
006cf76d3b
move to rust 2021, tweak macro ( #428 )
...
* cargo fix --edition
* move to rust 2021
* simplify macro now that patterns are supported natively
Co-authored-by: James Wilson <james@jsdw.me >
2021-11-15 14:52:16 +00:00
James Wilson
b4b128f9fe
Tidy up stale connections. ( #406 )
...
* If messageId changes and network ID doesn't, remove 'old' message_id
* Boot nodes/connection when no recent messages received for it
* Separate task needed for soketto recv to avoid cancel-safety issues with new interval
* Wee tidy up
* cargo fmt
* Add some logging around node adding/removing
* Another log info msg
* a bit of tidy up
* bump stale node timeout to 60s
2021-09-21 15:49:42 +01:00
James Wilson
a3ffaf3c44
Flume fix part 2: avoid using flume in a couple of cases, and revert attempted fix#1 ( #396 )
...
* A second attempt to avoid the flume memory leak, since the first didn't actually work
* No luck with second flume fix, so revert to futures::mpsc in a few places)
* cargo fmt
* Add a comment to cover use of into_stream
2021-09-03 15:55:25 +01:00
James Wilson
2932075783
Avoid using flume::Receiver::into_stream() to avoid memory leaks until the issue is resolved upstream ( #394 )
...
* Tweak rolling_total test to also confirm capacity doesn't go nuts
* Use Jemalloc
* Avoid flume's into_stream and use a workaround for now
* cargo fmt
* Improve comments now that there's an issue to point to
2021-09-03 08:40:43 +01:00
James Wilson
ec5db0fbbf
Bump tokio to 1.10 and add a test to confirm memory usage of rolling_total ( #392 )
2021-08-31 20:18:46 +02:00
James Wilson
7a3e30cb01
Don't remove all feeds subscribed to a chain when one disconnects ( #383 )
...
* Only remove the feed that disconnected to not break the rest...
* use multimap struct to avoid sync issues between feed and chain
* add a remove test, too
* cargo fmt
* fix name of test
* move multimap to common so we can doctest it and add 'unique' to name
* cargo fmt
* Return old key if value moved to make uniqueness more obvious
2021-08-27 08:05:44 +01:00
James Wilson
b842c7fc8b
expose dropped message counts and fix some typos/wording
2021-08-13 11:33:53 +01:00
James Wilson
230987036a
cargo fmt
2021-08-12 16:01:35 +01:00
James Wilson
4f7b2c8ec5
Confirm that densemap len wont panic if lots of retired items
2021-08-12 16:01:30 +01:00
James Wilson
bd7a21ec39
Flumify everything
2021-08-12 16:01:17 +01:00
James Wilson
703a9ddc4e
use flume throughout telemetry_core
2021-08-12 16:01:14 +01:00
James Wilson
98c9ccd278
fmt, clean warnings, tidy aggregator opts and add queue length limit
2021-08-12 16:01:11 +01:00
James Wilson
87c0ee7d0d
monitor aggregator length (dont discard msgs yet)
2021-08-12 16:00:56 +01:00
James Wilson
80d6ad916e
Address David's comments
2021-08-11 17:23:22 +01:00
James Wilson
f26b39ac63
Address feedback from Niklas
2021-08-11 16:59:11 +01:00
James Wilson
c469ef8dfe
make AggregatorSet close to zero cost when only 1 aggregator asked for
2021-08-09 10:09:17 +01:00
James Wilson
88c3db3562
cargo fmt
2021-08-06 17:44:26 +01:00
James Wilson
74cf55174e
Use rayon to speed up subscribe message serializing
2021-08-06 17:42:03 +01:00
James Wilson
c2892286a6
Add a comment
2021-08-02 09:54:11 +01:00
James Wilson
b79759a412
Tidy up close handling and allow either side to close
2021-08-02 09:50:31 +01:00
James Wilson
963ef576f3
add on_close to abstract and simplify ws_client socket closing
2021-08-02 09:30:29 +01:00
James Wilson
13afb96f93
Be more fussy with Soketto channel wrapper; Soketto might do otherwise, but we only explicitly close the connection when both ends of the channel handed out are closed (or we encounter a connection error)
2021-07-30 21:26:52 +01:00
James Wilson
18918e6d3e
undo a previous change; close the connection if either side of the channel handed back is dropped/fails
2021-07-30 19:43:26 +01:00
James Wilson
a5b04cb4f0
improve socket channel close handling, and test the node banning (roughly)
2021-07-30 18:58:10 +01:00
James Wilson
b70ab9ed3d
Add license to the top of each source file
2021-07-29 17:34:40 +01:00
James Wilson
8a23f342a4
add another test for the rolling total
2021-07-29 08:53:13 +01:00
James Wilson
5f022069db
cargo fmt
2021-07-28 16:15:34 +01:00
James Wilson
83d31ef0b3
Add rolling total and allow control over bytes per second allowed from node connections
2021-07-28 16:08:02 +01:00
James Wilson
2ca5f6a1fb
cargo fmt
2021-07-27 12:38:05 +01:00
James Wilson
ecf5fccaab
make possible to test, test, and fix feed cutoff
2021-07-26 16:38:24 +01:00
James Wilson
50935b29fc
put a deadline on message sending to feeds
2021-07-26 11:52:46 +01:00
James Wilson
e043de8ddb
Expose raw Soketto interface via ws_client for more control where needed (eg in tests)
2021-07-26 11:31:40 +01:00
James Wilson
cf0e424803
Adapt shard to use hyper+soketto instead
2021-07-23 17:07:29 +01:00
James Wilson
0eff32d10e
Migrate telemetry_core to Hyper+Soketto
2021-07-23 15:57:50 +01:00
James Wilson
999d8ff0bd
debounce feed polling a little to reduce CPU load when lots of messages are being sent out
2021-07-21 12:06:22 +01:00
James Wilson
cca1df2e21
use ws_client in shard, too, and make it better at handling core disconnecting
2021-07-20 13:04:10 +01:00
James Wilson
c1208b9e81
cargo fmt
2021-07-13 16:51:24 +01:00
James Wilson
9ac5ea7624
Various bits and pieces to address PR comments
2021-07-13 16:51:14 +01:00
James Wilson
28be68e65f
Get a basic first test working, and lots of changes to supporting code to facilitate this
2021-07-09 19:41:53 +01:00
James Wilson
ea98b15def
No need for LogLevel
2021-07-01 15:59:41 +01:00
James Wilson
3c371ef9a8
add license back to Cargo.toml files
2021-07-01 15:12:39 +01:00
James Wilson
4bb1f19085
add some doc comments
2021-07-01 09:58:18 +01:00
James Wilson
5d00445324
Make syntax of id_type identical to normal tuple struct
2021-07-01 09:38:53 +01:00
James Wilson
509542e460
fmt
2021-07-01 09:38:26 +01:00