INNER CODE UNIT · Python
get_build_benchmarks_dir
duckduckgo/Android · build-benchmarks/run-benchmark.py:45
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"
# Clean and recreate output directory
if output_dir.exists():
print(f"Cleaning existing results directory: {output_dir}")
shutil.rmtree(output_dir)
output_dir.mkdir(parents=True, exist_ok=True)
# Build the gradle-profiler command