diff --git a/rustfs/src/admin/handlers.rs b/rustfs/src/admin/handlers.rs index 40d7b872..cdd67551 100644 --- a/rustfs/src/admin/handlers.rs +++ b/rustfs/src/admin/handlers.rs @@ -81,6 +81,7 @@ pub mod sts; pub mod tier; pub mod trace; pub mod user; +#[cfg(not(target_os = "windows"))] use pprof::protos::Message; use urlencoding::decode; diff --git a/rustfs/src/admin/mod.rs b/rustfs/src/admin/mod.rs index e020ed34..e6158463 100644 --- a/rustfs/src/admin/mod.rs +++ b/rustfs/src/admin/mod.rs @@ -215,12 +215,14 @@ pub fn make_admin_route(console_enabled: bool) -> std::io::Result )?; // Performance profiling endpoints (available on all platforms, with platform-specific responses) + #[cfg(not(target_os = "windows"))] r.insert( Method::GET, format!("{}{}", ADMIN_PREFIX, "/debug/pprof/profile").as_str(), AdminOperation(&handlers::ProfileHandler {}), )?; + #[cfg(not(target_os = "windows"))] r.insert( Method::GET, format!("{}{}", ADMIN_PREFIX, "/debug/pprof/status").as_str(),