Remove mem_info and references to parity-util-mem (#12795)

* Remove mem_info and some references to parity-util-mem

* [Draft] Finish removing references to `parity-util-mem`

* Upgrade dependencies

* Update scripts/ci/deny.toml

Co-authored-by: ordian <write@reusable.software>

* Fix Cargo.lock (remove unwanted dependency changes)

* Removed unused argument

* Run cargo fmt (didn't have pre-commit set up)

* Fix some CI errors

* Fix another CI error

* Remove unused dependency

Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
Marcin S
2022-12-06 09:55:10 -05:00
committed by GitHub
parent 07117e7913
commit aa21e56744
46 changed files with 70 additions and 426 deletions
+2 -9
View File
@@ -436,9 +436,7 @@ where
TBl::Hash: Unpin,
TBl::Header: Unpin,
TBackend: 'static + sc_client_api::backend::Backend<TBl> + Send,
TExPool: MaintainedTransactionPool<Block = TBl, Hash = <TBl as BlockT>::Hash>
+ parity_util_mem::MallocSizeOf
+ 'static,
TExPool: MaintainedTransactionPool<Block = TBl, Hash = <TBl as BlockT>::Hash> + 'static,
{
let SpawnTasksParams {
mut config,
@@ -540,12 +538,7 @@ where
spawn_handle.spawn(
"informant",
None,
sc_informant::build(
client.clone(),
network,
transaction_pool.clone(),
config.informant_output_format,
),
sc_informant::build(client.clone(), network, config.informant_output_format),
);
task_manager.keep_alive((config.base_path, rpc));
-20
View File
@@ -43,7 +43,6 @@ struct PrometheusMetrics {
// I/O
database_cache: Gauge<U64>,
state_cache: Gauge<U64>,
state_db: GaugeVec<U64>,
}
impl PrometheusMetrics {
@@ -117,13 +116,6 @@ impl PrometheusMetrics {
Gauge::new("substrate_state_cache_bytes", "State cache size in bytes")?,
registry,
)?,
state_db: register(
GaugeVec::new(
Opts::new("substrate_state_db_cache_bytes", "State DB cache in bytes"),
&["subtype"],
)?,
registry,
)?,
})
}
}
@@ -254,18 +246,6 @@ impl MetricsService {
if let Some(info) = info.usage.as_ref() {
metrics.database_cache.set(info.memory.database_cache.as_bytes() as u64);
metrics.state_cache.set(info.memory.state_cache.as_bytes() as u64);
metrics
.state_db
.with_label_values(&["non_canonical"])
.set(info.memory.state_db.non_canonical.as_bytes() as u64);
if let Some(pruning) = info.memory.state_db.pruning {
metrics.state_db.with_label_values(&["pruning"]).set(pruning.as_bytes() as u64);
}
metrics
.state_db
.with_label_values(&["pinned"])
.set(info.memory.state_db.pinned.as_bytes() as u64);
}
}