INNER CODE UNIT · Python
process_results
duckduckgo/Android · build-benchmarks/run-benchmark.py:242
def process_results(
csv_path: Path,
github_action_run_id: Optional[str] = None,
git_commit_sha: Optional[str] = None,
report_pixel: bool = False
) -> int:
"""Process benchmark results from CSV file."""
print(f"Parsing results from: {csv_path}")
results = parse_csv(csv_path)
print(generate_terminal_summary(results))
# Send results to API only if both conditions are met
if results and report_pixel and github_action_run_id and git_commit_sha:
print("\n" + "=" * 80)
print("SENDING RESULTS TO API")
print("=" * 80)
send_results_to_api(results, github_action_run_id, git_commit_sha)
elif results and report_pixel and (not github_action_run_id or not git_commit_sha):