k4bench.provenance.stack¶
k4bench.provenance.stack ¶
Read an LCG Key4hep nightly's identity and git provenance off CVMFS.
LCG rotates weekday-named views, so their generated timestamp is the release
identity. Package revisions come from the manifest's install paths and the
.buildinfo_* file installed with each HEAD build. Metadata failures return
an empty result rather than failing the benchmark they describe.
StackSnapshot
dataclass
¶
StackSnapshot(packages: dict[str, dict], loaded: frozenset[str] | None = None, datasets: dict[str, str] | None = None, os: str | None = None, complete: bool = False, unmappable: frozenset[str] | None = None)
One recorded stack and the measured scope that supplied it.
RepoRef
dataclass
¶
A package's upstream repository, parsed far enough to build links.
code_search_url ¶
Where symbol is defined in the repository. GitHub searches only the default branch, and only for a signed-in user; GitLab at ref.
Source code in k4bench/provenance/stack.py
capture_stack ¶
Save the manifests and reduce all measured configs' private path lists.
Missing instrumentation on any measured config makes the union unknown. Dataset directories come from the instrumented process's environment; the job environment also records them when instrumentation is unavailable.
Source code in k4bench/provenance/stack.py
parse_manifest ¶
Read package rows, ignoring the manifest's platform/compiler headers.
Source code in k4bench/provenance/stack.py
build_info ¶
Available upstream and toolchain revisions of one installed build.
Source code in k4bench/provenance/stack.py
resolved_install ¶
The directory install resolves to now, where symlinks lead elsewhere.
Recorded at capture: the auditor names libraries by their resolved paths, and LCG's rotating names may point elsewhere when the run is read.
Source code in k4bench/provenance/stack.py
mapped_packages ¶
Resolve view symlinks and match the longest manifest install prefix.
Unmatched paths are returned to the caller, including OS and harness files. No CVMFS location is assumed: contrib and stable releases use the same match.
Source code in k4bench/provenance/stack.py
stack_snapshot ¶
stack_snapshot(info: dict, machine: dict, manifests: list[str] | tuple[str, ...] = ()) -> StackSnapshot
Combine immutable artifacts without resolving their now-rotating paths.
Source code in k4bench/provenance/stack.py
stack_identity ¶
Return (publication_date, platform) from an LCG view setup.
Source code in k4bench/provenance/stack.py
parse_repo ¶
parse_repo(url: str | None) -> RepoRef | None
Parse a GitHub/GitLab repository URL used by attribution links.
Source code in k4bench/provenance/stack.py
read_stack ¶
Return the LCG manifest and git-built HEAD packages for a view setup.