MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / resolve_unwinding

Method resolve_unwinding

src/cli/shared.rs:251–260  ·  view source on GitHub ↗

Resolves the effective unwinding, honoring the deprecated `--perf-unwinding-mode` / `CODSPEED_PERF_UNWINDING_MODE` flag with a warning. The new flag takes precedence when both are set.

(&self)

Source from the content-addressed store, hash-verified

249 /// `--perf-unwinding-mode` / `CODSPEED_PERF_UNWINDING_MODE` flag with a warning.
250 /// The new flag takes precedence when both are set.
251 pub fn resolve_unwinding(&self) -> Option<WalltimeUnwinding> {
252 let Some(legacy) = self.perf_unwinding_mode else {
253 return self.walltime_unwinding_mode;
254 };
255 // TODO(COD-4063): use warn! once the logger is installed before config resolution.
256 eprintln!(
257 "Warning: CODSPEED_PERF_UNWINDING_MODE / --perf-unwinding-mode is deprecated; use CODSPEED_WALLTIME_UNWINDING_MODE / --walltime-unwinding-mode instead."
258 );
259 Some(self.walltime_unwinding_mode.unwrap_or(legacy))
260 }
261}
262
263impl ProfilerRunArgs {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected