metadata
Environment metadata collection for benchmark reproducibility.
Functions
function
collect_environment() → TestEnvironmentCollect test environment information from the current system.
Collect test environment information from the current system.
Returns:
TestEnvironment with hardware and software information
function
create_run_directory(base_dir: Path, prefix: str = '') → PathCreate a timestamped directory for benchmark results.
Create a timestamped directory for benchmark results.
Args:
base_dir: Base directory for results
prefix: Optional prefix for the directory name
Returns:
Path to created directory
Parameters
base_dir: Pathprefix: str= ''
function
format_environment_summary(env: TestEnvironment) → strFormat environment as a human-readable summary.
Format environment as a human-readable summary.
Args:
env: TestEnvironment to format
Returns:
Formatted string summary
Parameters
env: TestEnvironment
function
load_environment(input_path: Path) → TestEnvironmentLoad environment metadata from a JSON file.
Load environment metadata from a JSON file.
Args:
input_path: Path to input JSON file
Returns:
TestEnvironment loaded from file
Parameters
input_path: Path
function
save_environment(env: TestEnvironment, output_path: Path) → NoneSave environment metadata to a JSON file.
Save environment metadata to a JSON file.
Args:
env: TestEnvironment to save
output_path: Path to output JSON file
Parameters
env: TestEnvironmentoutput_path: Path