kaspi/benchmark

Simple benchmarking library

Maintainers

Package info

github.com/agdobrynin/benchmark

pkg:composer/kaspi/benchmark

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.x-dev 2026-08-24 05:25 UTC

This package is auto-updated.

Last update: 2026-08-24 05:25:53 UTC


README

Install

composer require kaspi/benchmark

How to use

Tests

Running tests without code coverage analysis:

composer test

Running tests with code coverage analysis:

composer test-cover

Static code analysis

We use the PHPStan package for static analysis:

composer stat

Code style

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

Tests

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

⛑ The results will be in the .coverage-html folder.

Static code analysis

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