Skip to content

dev-Marwan#259

Open
dev-Marwan wants to merge 1 commit into
tempestphp:mainfrom
dev-Marwan:main
Open

dev-Marwan#259
dev-Marwan wants to merge 1 commit into
tempestphp:mainfrom
dev-Marwan:main

Conversation

@dev-Marwan

Copy link
Copy Markdown

First submission for the 100M row challenge.

Approach:

  • Stream input using fgets
  • Extract path and date via strpos/substr
  • Aggregate counts in nested arrays
  • Sort dates per path for deterministic output
  • Output JSON with JSON_PRETTY_PRINT

Validation not passes with php tempest data:validate unless converted to CRLF like test-data-expected.json (commented for now, let's see...)

@dev-Marwan dev-Marwan changed the title 1st try dev-Marwan Mar 10, 2026
@brendt

brendt commented Mar 11, 2026

Copy link
Copy Markdown
Member

Benchmarking complete! Best execution time: 40.129s

Full results:

{
  "results": [
    {
      "command": "cd /Users/brentroose/Dev/100-million-row-challenge/app/Commands/../../.benchmark/pr-259 && php -dmax_execution_time=300 tempest data:parse --input-path=\"/Users/brentroose/Dev/100-million-row-challenge/app/Commands/../../data/real-data.csv\" --output-path=\"/Users/brentroose/Dev/100-million-row-challenge/app/Commands/../../data/real-data-actual.json\"",
      "mean": 40.1290615842,
      "stddev": null,
      "median": 40.1290615842,
      "user": 38.9823501,
      "system": 1.14254438,
      "min": 40.1290615842,
      "max": 40.1290615842,
      "times": [
        40.1290615842
      ],
      "memory_usage_byte": [
        103006208
      ],
      "exit_codes": [
        0
      ]
    }
  ]
}

@brendt brendt removed the verified label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants