Skip to content

Commit 9fa3039

Browse files
authored
Downgrade memory_profiler logs to trace (#4766)
## Motivation This is a pretty spammy log. ## Proposal Downgrade to trace. ## Test Plan N/A ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 42bc35c commit 9fa3039

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

linera-metrics/src/memory_profiler.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use axum::{
1212
};
1313
use jemalloc_pprof::PROF_CTL;
1414
use thiserror::Error;
15-
use tracing::{error, info};
15+
use tracing::{error, info, trace};
1616

1717
#[derive(Debug, Error)]
1818
pub enum MemoryProfilerError {
@@ -40,7 +40,7 @@ impl MemoryProfiler {
4040
return Err(MemoryProfilerError::JemallocProfilingNotActivated);
4141
}
4242

43-
info!("✓ jemalloc memory profiling is ready");
43+
trace!("✓ jemalloc memory profiling is ready");
4444
} else {
4545
error!("PROF_CTL not available");
4646
return Err(MemoryProfilerError::ProfCtlNotAvailable);
@@ -55,7 +55,7 @@ impl MemoryProfiler {
5555

5656
match Self::collect_heap_profile().await {
5757
Ok(profile_data) => {
58-
info!("✓ Serving heap profile ({} bytes)", profile_data.len());
58+
trace!("✓ Serving heap profile ({} bytes)", profile_data.len());
5959
Ok((
6060
StatusCode::OK,
6161
[(header::CONTENT_TYPE, "application/octet-stream")],
@@ -75,7 +75,7 @@ impl MemoryProfiler {
7575

7676
match Self::collect_heap_flamegraph().await {
7777
Ok(flamegraph_svg) => {
78-
info!("✓ Serving heap flamegraph ({} bytes)", flamegraph_svg.len());
78+
trace!("✓ Serving heap flamegraph ({} bytes)", flamegraph_svg.len());
7979
Ok((
8080
StatusCode::OK,
8181
[(header::CONTENT_TYPE, "image/svg+xml")],
@@ -100,7 +100,7 @@ impl MemoryProfiler {
100100

101101
match prof_ctl.dump_pprof() {
102102
Ok(profile) => {
103-
info!("✓ Collected heap profile ({} bytes)", profile.len());
103+
trace!("✓ Collected heap profile ({} bytes)", profile.len());
104104
Ok(profile)
105105
}
106106
Err(e) => {
@@ -124,7 +124,7 @@ impl MemoryProfiler {
124124

125125
match prof_ctl.dump_flamegraph() {
126126
Ok(flamegraph_bytes) => {
127-
info!("✓ Generated flamegraph ({} bytes)", flamegraph_bytes.len());
127+
trace!("✓ Generated flamegraph ({} bytes)", flamegraph_bytes.len());
128128
Ok(flamegraph_bytes)
129129
}
130130
Err(e) => {

0 commit comments

Comments
 (0)