PHPackages                             tarantool/benchmarks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. tarantool/benchmarks

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tarantool/benchmarks
====================

Benchmarks for Tarantool PHP connectors.

60PHPCI failing

Since May 3Pushed 6y ago2 watchersCompare

[ Source](https://github.com/tarantool-php/benchmarks)[ Packagist](https://packagist.org/packages/tarantool/benchmarks)[ RSS](/packages/tarantool-benchmarks/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Benchmarks for Tarantool PHP connectors
=======================================

[](#benchmarks-for-tarantool-php-connectors)

[![Telegram](https://camo.githubusercontent.com/fcbb762172f6027f3e2f84b45d2f561a6c730200c819552f3cf384015c3c782f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54656c656772616d2d6a6f696e253230636861742d626c75652e737667)](https://t.me/tarantool_php)

This repository contains code to benchmark PHP connectors for [Tarantool](https://www.tarantool.io/en/developers/). Currently, there are two connectors available:

- [tarantool/client](https://github.com/tarantool-php/client) written in pure PHP
- The official [PECL](https://github.com/tarantool/tarantool-php) extension

*A more detailed explanation of the benchmarks represented in this repository can be found in [this article](https://habr.com/en/company/mailru/blog/480032/).*

Requirements
------------

[](#requirements)

- PHP 7.1+ (NTS and ZTS)
- [Composer](https://getcomposer.org/)
- [Tarantool](https://www.tarantool.io/) 1.7.1+
- [ext-msgpack](https://github.com/msgpack/msgpack-php) to benchmark `Tarantool\Client\Packer\PeclPacker`
- ext-async ([fork](https://github.com/dreamsxin/ext-async)) to benchmark connectors in async mode
- [ext-parallel](https://github.com/krakjoe/parallel) to benchmark connectors in parallel mode
- [ext-swoole](https://github.com/swoole/swoole-src) to benchmark connectors in async mode
- [ext-tarantool](https://github.com/tarantool/tarantool-php) to benchmark the official PHP connector

Usage
-----

[](#usage)

First, make sure you have the [bench.lua](bench.lua) instance running.

> If you want to run it on Docker, execute:
>
> ```
> docker run -d --network host --name=tarantool-bench \
>    -v $PWD/bench.lua:/bench.lua tarantool/tarantool:2 tarantool /bench.lua
> ```

Then run

```
make
```

to see the usage text and a list of all available benchmarks. For example, to (re)run all benchmarks, execute

```
make clean bench-all
```

> Alternatively, you may run benchmarks on Docker using Docker Compose:
>
> ```
> docker-compose run --rm benchmarks make clean bench-all
> ```

You may change default benchmark settings by defining the following environment variables (in parentheses are the default values):

- `TNT_BENCH_TARANTOOL_URI` *(`tcp://localhost:3301`)*
- `TNT_BENCH_TEMPLATE` *(`default.php.tpl`)*
- `TNT_BENCH_ITERATIONS` *(`5`)*
- `TNT_BENCH_REVOLUTIONS` *(`10000`)*
- `TNT_BENCH_RETRY_THRESHOLD` *(`3`)*

For example:

```
make clean bench-all TNT_BENCH_REVOLUTIONS=20000 TNT_BENCH_RETRY_THRESHOLD=5
```

Results
-------

[](#results)

The below results were made by running benchmarks on Apple MacBook Pro (2015) on the following environment:

- Linux Fedora 30, kernel 5.3.8-200.fc30.x86\_64
- Tarantool 2.3.0-115-g5ba5ed37e running on Docker
- Docker 19.03.3, build a872fc2f86
- PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
- PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( ZTS )
- tarantool/client 0.6.0
- rybakit/msgpack 0.6.1
- ext-tarantool 0.3.2 with the [patch](https://github.com/tarantool/tarantool-php/pull/148/files)
- ext-msgpack 2.0.3
- ext-async 0.3.0-8c1da46
- ext-swoole 4.4.12
- ext-parallel 1.1.3

#### Sync connectors

[](#sync-connectors)

[![chart](reports/charts/_sync_connectors.png)](reports/charts/_sync_connectors.png)

#### Sync client packers

[](#sync-client-packers)

[![chart](reports/charts/_sync_client_packers.png)](reports/charts/_sync_client_packers.png)

#### Sync client protocols

[](#sync-client-protocols)

[![chart](reports/charts/_sync_client_protocols.png)](reports/charts/_sync_client_protocols.png)

#### Async coroutines

[](#async-coroutines)

[![chart](reports/charts/_async_coroutines.png)](reports/charts/_async_coroutines.png)

#### Async connectors

[](#async-connectors)

[![chart](reports/charts/_async_connectors.png)](reports/charts/_async_connectors.png)

#### Async client protocols

[](#async-client-protocols)

[![chart](reports/charts/_async_client_protocols.png)](reports/charts/_async_client_protocols.png)

#### Swoole coroutines

[](#swoole-coroutines)

[![chart](reports/charts/_swoole_coroutines.png)](reports/charts/_swoole_coroutines.png)

#### Swoole connectors

[](#swoole-connectors)

[![chart](reports/charts/_swoole_connectors.png)](reports/charts/_swoole_connectors.png)

#### Swoole client protocols

[](#swoole-client-protocols)

[![chart](reports/charts/_swoole_client_protocols.png)](reports/charts/_swoole_client_protocols.png)

#### Parallel threads

[](#parallel-threads)

[![chart](reports/charts/_parallel_threads.png)](reports/charts/_parallel_threads.png)

#### Parallel connectors

[](#parallel-connectors)

[![chart](reports/charts/_parallel_connectors.png)](reports/charts/_parallel_connectors.png)

#### Parallel client protocols

[](#parallel-client-protocols)

[![chart](reports/charts/_parallel_client_protocols.png)](reports/charts/_parallel_client_protocols.png)

#### All extensions

[](#all-extensions)

[![chart](reports/charts/_extensions.png)](reports/charts/_extensions.png)

License
-------

[](#license)

The library is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/533861?v=4)[Eugene Leonovich](/maintainers/rybakit)[@rybakit](https://github.com/rybakit)

---

Top Contributors

[![rybakit](https://avatars.githubusercontent.com/u/533861?v=4)](https://github.com/rybakit "rybakit (57 commits)")

---

Tags

benchmarkingext-asyncext-parallelext-swooleperformancetarantooltarantool-connector

### Embed Badge

![Health badge](/badges/tarantool-benchmarks/health.svg)

```
[![Health](https://phpackages.com/badges/tarantool-benchmarks/health.svg)](https://phpackages.com/packages/tarantool-benchmarks)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
