Skip to content

slow coverage data generation #1044

@staabm

Description

@staabm
Q A
ParaTest version 7.8.4
PHPUnit version 11.5.43
PHP version 8.3.27

Summary

running paratest with pcov and coverage generation on phpstan-src reports, that after running the tests for 4min40s (which is fast), we need another minute to generate the coverage xml report

Image

see https://github.com/phpstan/phpstan-src/actions/runs/19078182639/job/54499398288?pr=4525

I would hope that there is some low hanging fruit to speedup coverage xml export.
I did not yet succeed in extracting the gathered information to make the process easily reproducible (and measurable with a profiler).
maybe you have ideas on how this can be made faster or how to at best investigate the problem without a 8minute feedback loop?

Current behavior

coverage data generation seems slow

How to reproduce: command, code and error stack trace

  • git clone phpstan-src
  • composer install
  • run make tests (which installs paratest)
  • run php -d pcov.enabled=1 tests/vendor/bin/paratest --passthru-php="'-d' 'pcov.enabled=1'" --coverage-xml=tmp/coverage/coverage-xml --log-junit=tmp/coverage/junit.xml

Expected behavior

faster xml code coverage export

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions