INNER CODE UNIT · Python
get_repo_root
duckduckgo/Android · build-benchmarks/run-benchmark.py:37
def get_repo_root() -> Path:
"""Get the repository root directory (parent of build-benchmarks)."""
# Get the directory where this script is located
script_dir = Path(__file__).resolve().parent
# The script is in build-benchmarks, so parent is repo root
return script_dir.parent
def get_build_benchmarks_dir() -> Path:
"""Get the build-benchmarks directory."""
return Path(__file__).resolve().parent
def run_gradle_profiler(repo_root: Path, gradle_user_home: str) -> int:
"""Run gradle-profiler benchmark."""
build_benchmarks_dir = get_build_benchmarks_dir()
scenario_file = build_benchmarks_dir / "build-benchmark.scenarios"
output_dir = build_benchmarks_dir / "results"