llg3d.benchmarks.compare_commits¶
Compare simple benchmark timings between commits using GitPython.
This script keeps repository objects local to main() so it fails fast when not run from the llg3d repository.
Functions
|
Checkout the given commit in repo. |
|
Exit if the worktree contains changes or untracked files. |
|
Return the current commit hexsha for repo. |
|
Return the current branch name, or the commit if HEAD is detached. |
Return the llg3d GitPython Repo object. |
|
|
Command-line entry point: compare benchmark timings between commits. |
|
Print a simple separator line to stdout. |
|
Run a single benchmark and return a dict with timing results. |
- get_current_commit(repo)[source]¶
Return the current commit hexsha for repo.
- Parameters:
repo (Repo)
- Return type:
str
- get_current_ref(repo)[source]¶
Return the current branch name, or the commit if HEAD is detached.
- Parameters:
repo (Repo)
- Return type:
str
- ensure_clean_worktree(repo)[source]¶
Exit if the worktree contains changes or untracked files.
- Parameters:
repo (Repo)
- Return type:
None
- checkout_commit(repo, commit)[source]¶
Checkout the given commit in repo.
- Parameters:
repo (Repo)
commit (str)
- Return type:
None
- run_single_benchmark(solver, Jx, Jy, Jz, n_mean, N, launcher=None, np_procs=1, precision='single', repo_root=None)[source]¶
Run a single benchmark and return a dict with timing results.
- Parameters:
solver (str)
Jx (int)
Jy (int)
Jz (int)
n_mean (int)
N (int)
launcher (str | None)
np_procs (int)
precision (str)
repo_root (Path | None)
- Return type:
dict