pub mod continuousmonitoring;
pub mod flame_graph_svg;
pub mod hardware_counters;
pub mod performance_hints;
pub mod production;
pub mod systemmonitor;
pub use production::{
PerformanceBottleneck, PerformanceRegression, ProductionProfiler, ProfileConfig,
ResourceUsage, WorkloadAnalysisReport, WorkloadType,
};
pub type ProfilerResult<T> = Result<T, Box<dyn std::error::Error>>;
#[derive(Debug)]
pub struct ProfilingSession {
pub id: String,
pub start_time: std::time::Instant,
}
impl ProfilingSession {
pub fn new(id: &str) -> ProfilerResult<Self> {
Ok(Self {
id: id.to_string(),
start_time: std::time::Instant::now(),
})
}
}
pub mod prelude {
pub use super::production::{
PerformanceBottleneck, PerformanceRegression, ProductionProfiler, ProfileConfig,
ResourceUsage, WorkloadAnalysisReport, WorkloadType,
};
}