kaspi/benchmark

Simple benchmarking library

Maintainers

Package info

github.com/agdobrynin/benchmark

pkg:composer/kaspi/benchmark

Transparency log

Statistics

Installs: 43

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.2 2026-08-27 15:11 UTC

This package is auto-updated.

Last update: 2026-08-27 15:13:32 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