kaspi / benchmark
Simple benchmarking library
Requires
- php: 8.1 - 8.5
- ext-reflection: *
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.95.21
- mikey179/vfsstream: 1.6.12
- phpstan/phpstan: 2.2.9
- phpstan/phpstan-strict-rules: 2.0.12
- phpunit/phpunit: 10.5.64
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-1.1x
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- 1.0.x-dev
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- 0.1.x-dev
- v0.1.0
- dev-release/1.1.3
- dev-19-calc-max-time
- dev-19-calculate-the-average-and-maximum-execution-time
- dev-release/1.1.2
- dev-release/1.1.1
- dev-15-information-is-needed-regarding-the-operating-system-used-when-running-the-benchmarks
- dev-14-saves-only-one-iteration-in-the-results-file
- dev-release/1.1.0
- dev-0.2x
This package is auto-updated.
Last update: 2026-09-10 14:10:04 UTC
README
This library allows you to compare the performance of different versions of the "kaspi/di-container" package.
How to use the library
Up-to-date performance comparison results for the "kaspi/di-container" package using this library can be found in the kaspi-di-container-bench repository.
Library development
Testing the library code
Running tests without code coverage analysis:
composer test
Running tests with code coverage analysis:
composer test-cover
Static analysis of library code
We use the PHPStan package for static analysis:
composer stat
Code style of library
To bring the code into compliance with standards, we use friendsofphp/php-cs-fixer, which is declared in the composer dev dependency:
composer fixer
Using a Docker image with PHP 8.1, 8.2, 8.3, 8.4, 8.5
You can specify the PHP version image in the .env file using the PHP_IMAGE key.
By default, the container is built using the php:8.1-cli-alpine image.
Building docker container
docker-compose build
Install dependencies via composer:
docker-compose run --rm php composer install
🔔 If make is installed on the system:
make install
Testing the library code
Running tests without code coverage analysis:
docker-compose run --rm php vendor/bin/phpunit --no-coverage
🔔 If make is installed on the system:
make test
Running tests with code coverage analysis:
docker-compose run --rm php vendor/bin/phpunit
🔔 If make is installed on the system:
make test-cover
Static analysis of library code
docker-compose run --rm php vendor/bin/phpstan
🔔 If make is installed on the system:
make stat
All checks in a single command
If make is installed, run the code-style check, static analyzer, and tests:
make all
Running tests for all supported PHP versions using Docker images.
If make is installed, the vendor directory and composer.lock file are removed before running the tests;
dependencies are installed, and only then are the tests executed:
make test-supports-php
Other
You can work in the shell within a Docker container:
docker-compose run --rm php sh