mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
disable pprof on win (#524)
Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -215,12 +215,14 @@ pub fn make_admin_route(console_enabled: bool) -> std::io::Result<impl S3Route>
|
||||
)?;
|
||||
|
||||
// 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(),
|
||||
|
||||
Reference in New Issue
Block a user