mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
[Substrate Companion] Upgrade to libp2p 0.51.3 (#7000)
* upgrade js-sys to 0.3.61
* update wasm-bindgen-futures
* update once_cell
* update either
* update futures
* update pyroscope to 0.5.3
* use the new pyroscope API
* add missing imports
* readme is incorrect
* add shutdown
* fix shutdown
* remove mut
* remove mut 2
* redo updates
* update zeroize
* update lockfile for {"substrate"}
* update lockfile for {"substrate", "cumulus"}
* redo updates
* restart CI
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -30,6 +30,8 @@ use std::net::ToSocketAddrs;
|
||||
pub use crate::{error::Error, service::BlockId};
|
||||
#[cfg(feature = "hostperfcheck")]
|
||||
pub use polkadot_performance_test::PerfCheckError;
|
||||
#[cfg(feature = "pyroscope")]
|
||||
use pyroscope_pprofrs::{pprof_backend, PprofConfig};
|
||||
|
||||
impl From<String> for Error {
|
||||
fn from(s: String) -> Self {
|
||||
@@ -377,14 +379,13 @@ pub fn run() -> Result<()> {
|
||||
.next()
|
||||
.ok_or_else(|| Error::AddressResolutionMissing)?;
|
||||
// The pyroscope agent requires a `http://` prefix, so we just do that.
|
||||
let mut agent = pyro::PyroscopeAgent::builder(
|
||||
let agent = pyro::PyroscopeAgent::builder(
|
||||
"http://".to_owned() + address.to_string().as_str(),
|
||||
"polkadot".to_owned(),
|
||||
)
|
||||
.sample_rate(113)
|
||||
.backend(pprof_backend(PprofConfig::new().sample_rate(113)))
|
||||
.build()?;
|
||||
agent.start();
|
||||
Some(agent)
|
||||
Some(agent.start()?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
@@ -727,8 +728,9 @@ pub fn run() -> Result<()> {
|
||||
}?;
|
||||
|
||||
#[cfg(feature = "pyroscope")]
|
||||
if let Some(mut pyroscope_agent) = pyroscope_agent_maybe.take() {
|
||||
pyroscope_agent.stop();
|
||||
if let Some(pyroscope_agent) = pyroscope_agent_maybe.take() {
|
||||
let agent = pyroscope_agent.stop()?;
|
||||
agent.shutdown();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user