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

Function get_root_dir

src/shell_session_store.rs:42–50  ·  view source on GitHub ↗
(kind: SessionKind)

Source from the content-addressed store, hash-verified

40static SYSTEM: OnceLock<System> = OnceLock::new();
41
42fn get_root_dir(kind: SessionKind) -> PathBuf {
43 let base_dir = if let Some(xdg_runtime_dir) = std::env::var_os("XDG_RUNTIME_DIR") {
44 PathBuf::from(xdg_runtime_dir)
45 } else {
46 std::env::temp_dir()
47 };
48
49 base_dir.join(kind.as_dir_name())
50}
51
52fn get_parent_pid(pid: pid_t) -> Option<pid_t> {
53 let s = SYSTEM.get_or_init(|| {

Callers 2

registerFunction · 0.85
loadFunction · 0.85

Calls 1

as_dir_nameMethod · 0.80

Tested by

no test coverage detected