pyroscope 2.0.0

Pyroscope Profiler Agent for continuous profiling of Rust, Python and Ruby applications.
Documentation
//! Rust integration for [Pyroscope](https://pyroscope.io).
//!
//! # Quick Start
//!
//! ## Add the Pyroscope Library and the pprof-rs backend to Cargo.toml
//!
//! ```toml
//! [dependencies]
//! pyroscope = { version = "2.0.0", features = ["backend-pprof-rs"] }
//! ```
//!
//! ## Configure a Pyroscope Agent
//!
//! ```ignore
//! let agent =
//!     PyroscopeAgent::builder("http://localhost:4040", "myapp")
//!     .backend(pprof_backend(PprofConfig { sample_rate: 100 }, BackendConfig::default()))
//!     .build()?;
//! ```
//!
//! ## Start/Stop profiling
//!
//! To start profiling code and sending data.
//!
//! ```ignore
//!  let agent_running = agent.start()?;
//! ```
//!
//! To stop profiling code. You can restart the profiling at a later point.
//!
//! ```ignore
//!  let agent_ready = agent.stop()?;
//! ```
//!
//! Before you drop the variable, make sure to shutdown the agent.
//!
//! ```ignore
//! agent_ready.shutdown();
//! ```

extern crate core;

// Re-exports structs
pub use crate::pyroscope::PyroscopeAgent;
pub use error::{PyroscopeError, Result};

pub mod backend;
pub mod encode;
pub mod error;
pub mod pyroscope;
pub mod session;
pub mod timer;

mod utils;
pub use utils::ThreadId;
pub mod ffikit;