You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MemoryProfiler::get_or_init_with initializes the singleton PROFILER with memory_profiler::init_profiler. Inside the latter function, jemalloc's prof.reset control is used to set the configured sampling rate:
.map_err(|e| BootstrapError::new(e).context("failed to set sample interval"))?;
The problem is that prof.reset also resets the profiling data collected so far. Therefore, the first requested profile is empty instead of exposing data since the process started. As a user, this is highly unexpected especially because jemalloc was already collecting the data. I suggest that we perform this setup as part of the telemetry::init call early in the program startup.
The text was updated successfully, but these errors were encountered:
Foundations lazily initializes its memory profiling infrastructure on the first request to the telemetry server. This happens here:
foundations/foundations/src/telemetry/server.rs
Lines 172 to 180 in 9a6f4cd
MemoryProfiler::get_or_init_with
initializes the singletonPROFILER
withmemory_profiler::init_profiler
. Inside the latter function, jemalloc'sprof.reset
control is used to set the configured sampling rate:foundations/foundations/src/telemetry/memory_profiler.rs
Lines 168 to 169 in 9a6f4cd
The problem is that
prof.reset
also resets the profiling data collected so far. Therefore, the first requested profile is empty instead of exposing data since the process started. As a user, this is highly unexpected especially because jemalloc was already collecting the data. I suggest that we perform this setup as part of thetelemetry::init
call early in the program startup.The text was updated successfully, but these errors were encountered: