Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add missing imports
  • Loading branch information
melekes committed Apr 4, 2023
commit 83bae1e7d15a2deaef8f55390b4597c615989680
7 changes: 4 additions & 3 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, PprofConfig};

impl From<String> for Error {
fn from(s: String) -> Self {
Expand Down Expand Up @@ -383,8 +385,7 @@ pub fn run() -> Result<()> {
)
.backend(Pprof::new(PprofConfig::new().sample_rate(113)))
.build()?;
agent.start();
Some(agent)
Some(agent.start()?)
} else {
None
};
Expand Down Expand Up @@ -728,7 +729,7 @@ pub fn run() -> Result<()> {

#[cfg(feature = "pyroscope")]
if let Some(mut pyroscope_agent) = pyroscope_agent_maybe.take() {
pyroscope_agent.stop();
pyroscope_agent.stop()?;
}
Ok(())
}