-
Notifications
You must be signed in to change notification settings - Fork 2.6k
service: storage monitor added #13082
Changes from 3 commits
34577eb
b5f970b
37bbba4
ba0f28f
e360685
fd5679f
217234f
8b3310b
931339c
c200159
f5501f2
45171dc
f346394
eb49400
8619766
a0cd44d
d3f143c
a79af9a
00e7264
6c3eb1c
58dcf55
95b576b
0b8697e
c0fc2ca
de35dda
4e32f3d
0578588
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,10 @@ use crate::{ | |
| config::{Configuration, KeystoreConfig, PrometheusConfig}, | ||
| error::Error, | ||
| metrics::MetricsService, | ||
| start_rpc_servers, BuildGenesisBlock, GenesisBlockBuilder, RpcHandlers, SpawnTaskHandle, | ||
| TaskManager, TransactionPoolAdapter, | ||
| start_rpc_servers, | ||
| storage_monitor::StorageMonitorService, | ||
| BuildGenesisBlock, GenesisBlockBuilder, RpcHandlers, SpawnTaskHandle, TaskManager, | ||
| TransactionPoolAdapter, | ||
| }; | ||
| use futures::{channel::oneshot, future::ready, FutureExt, StreamExt}; | ||
| use jsonrpsee::RpcModule; | ||
|
|
@@ -534,6 +536,14 @@ where | |
| metrics_service.run(client.clone(), transaction_pool.clone(), network.clone()), | ||
| ); | ||
|
|
||
| if let Some(storage_monitor_service) = StorageMonitorService::new_for_config(&config)? { | ||
| task_manager.spawn_essential_handle().spawn( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea how long this takes?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on my pc test running for few minutes: typically few µs, sometimes several dozes µs, rarely hundreds. Histogram (in Still, even it is low on average, sometimes it can block for a little bit longer (0.12ms). Probably non-blocking spawn would be fine here. Let's give it a try. |
||
| "storage-monitor", | ||
| None, | ||
| storage_monitor_service.run(), | ||
| ) | ||
| } | ||
|
|
||
| let rpc_id_provider = config.rpc_id_provider.take(); | ||
|
|
||
| // jsonrpsee RPC | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.