INNER CODE UNIT · Python

parse_csv

duckduckgo/Android · build-benchmarks/run-benchmark.py:85

def parse_csv(csv_path: Path) -> List[BenchmarkResult]:
    """Parse gradle-profiler CSV output and extract metrics per scenario."""
    results = []

    if not csv_path.exists():
        print(f"Warning: CSV file not found: {csv_path}")
        return results

    with open(csv_path, 'r') as f:
        reader = csv.DictReader(f)
        measurements = {}

        for row in reader:
            scenario = row.get('Scenario')
            phase = row.get('Phase')
            sample = row.get('Sample')
            duration = row.get('Duration')
            # Process only 'total execution time' and 'task start' samples from MEASURE phase

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…