Skip to content

infection/benchmark-source

Repository files navigation

Infection Benchmark Source

A large-scale artificial PHP codebase designed for benchmarking and profiling Infection mutation testing framework performance.

Overview

This repository provides a substantial codebase with comprehensive test coverage to evaluate Infection's performance under realistic conditions. The codebase is automatically generated to ensure consistency and scalability.

Project Structure

infection-benchmark-source/
├── src/
│   ├── AutoGenerated/          # Auto-generated source classes
│   └── ...                     # Other (non-autogenerated) code
├── tests/
│   └── AutoGenerated/          # Auto-generated PHPUnit tests
├── code-generator/             # Code generation tooling
└── dist/coverage/              # Generated (template) coverage reports

Usage

Generate Coverage Data

Generate code coverage reports for benchmarking:

make generate_coverage

This command:

  • Executes the PHPUnit test suite with Xdebug coverage enabled
  • Generates XML coverage reports in dist/coverage/xml/
  • Generates JUnit test reports in dist/coverage/junit.xml
  • Normalizes absolute paths in reports for reusability.

⚠️ Warning: due to the random order of tests, the coverage generation is not deterministic.

Generate Code

Regenerate all auto-generated source and test files:

make generate_code

⚠️ Warning: All files under src/AutoGenerated/ and tests/AutoGenerated/ are auto-generated. Do not modify them manually as changes will be overwritten.

Run Tests

Execute the test suite without coverage:

make phpunit

Available Commands

make help

Extending the Codebase

To add new auto-generated code patterns, see the code-generator README.

License

This project is licensed under the MIT License.

About

Artificial codebase for benchmarking purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages