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

Function env

crates/runner-shared/src/runtime_env/python.rs:11–18  ·  view source on GitHub ↗

Python env: - `PYTHONHASHSEED=0`: deterministic hashing in every mode. - `PYTHON_PERF_JIT_SUPPORT`: perf jitdump for walltime profiles. FIXME(COD-2645): Keep this disabled on macOS. Enabling it causes many unresolved addresses on the stack when profiling with samply.

(mode: MeasurementMode)

Source from the content-addressed store, hash-verified

9/// FIXME(COD-2645): Keep this disabled on macOS. Enabling it causes
10/// many unresolved addresses on the stack when profiling with samply.
11pub(super) fn env(mode: MeasurementMode) -> Vec<(&'static str, String)> {
12 let perf_jit = mode == MeasurementMode::Walltime && !cfg!(target_os = "macos");
13 let perf_jit_value = if perf_jit { "1" } else { "0" };
14 vec![
15 (PYTHONHASHSEED, "0".to_owned()),
16 (PYTHON_PERF_JIT_SUPPORT, perf_jit_value.to_owned()),
17 ]
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected