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)
| 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 | |
| 263 | impl ProfilerRunArgs { |
no outgoing calls
no test coverage detected