Skip to content

Commit 4f3766b

Browse files
committed
Remove /debug/pprof/allocs/flamegraph
1 parent 2e40482 commit 4f3766b

File tree

5 files changed

+1
-111
lines changed

5 files changed

+1
-111
lines changed

Cargo.lock

Lines changed: 0 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ corrosion-utils = { path = "crates/corrosion-utils" }
224224
eyre = "0.6.12"
225225
enum-map = "2.7.3"
226226
futures = "0.3.31"
227-
jemalloc_pprof = { version = "0.8", features = ["symbolize", "flamegraph"] }
227+
jemalloc_pprof = { version = "0.8", features = ["symbolize"] }
228228
kube = { version = "1.1", features = [
229229
"runtime",
230230
"rustls-tls",

about.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,3 @@ accepted = ["ISC", "OpenSSL"]
3636

3737
[xxhash-rust]
3838
accepted = ["BSL-1.0"]
39-
40-
# TODO is it acceptable?
41-
[inferno]
42-
accepted = ["CDDL-1.0"]

deny.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@ exceptions = [
8080
# This license should not really be used for code, but here we are
8181
{ crate = "notify", allow = ["CC0-1.0"] },
8282
{ crate = "webpki-roots", allow = ["CDLA-Permissive-2.0"] },
83-
{ crate = "inferno", allow = ["CDDL-1.0"] },
8483
]

src/components/admin.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,6 @@ async fn handle_request<C: serde::Serialize>(
113113
.body(Body::new(Bytes::from(msg)))
114114
.unwrap(),
115115
},
116-
#[cfg(all(feature = "jemalloc", not(target_env = "msvc")))]
117-
(&Method::GET, "/debug/pprof/allocs/flamegraph") => {
118-
match handle_get_heap_flamegraph().await {
119-
Ok(response) => response,
120-
Err((status_code, msg)) => Response::builder()
121-
.status(status_code)
122-
.body(Body::new(Bytes::from(msg)))
123-
.unwrap(),
124-
}
125-
}
126116
#[cfg(target_os = "linux")]
127117
(&Method::GET, "/debug/pprof/profile") => {
128118
let duration = request.uri().query().and_then(|query| {
@@ -386,19 +376,6 @@ async fn handle_get_heap() -> Result<Response<Body>, (StatusCode, String)> {
386376
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))
387377
}
388378

389-
#[cfg(all(feature = "jemalloc", not(target_env = "msvc")))]
390-
async fn handle_get_heap_flamegraph() -> Result<Response<Body>, (StatusCode, String)> {
391-
let mut prof_ctl = jemalloc_pprof::PROF_CTL.as_ref().unwrap().lock().await;
392-
require_profiling_activated(&prof_ctl)?;
393-
let svg = prof_ctl
394-
.dump_flamegraph()
395-
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
396-
Response::builder()
397-
.header(hyper::header::CONTENT_TYPE, "image/svg+xml")
398-
.body(Body::from(svg))
399-
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))
400-
}
401-
402379
#[cfg(test)]
403380
mod tests {
404381

0 commit comments

Comments
 (0)