roukmoute / http-client-benchmark

Benchmark of http client under php-http

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test PSR-7 implementation

This test performance for PST-7 implementation. We just create Request, Reponse, Stream and Uri objects and measure the time. Note that the number does not really matter. It is the difference between them that are interesting.

Run

cd guzzle
composer update
cd ..
php -S 127.0.0.1:8081 &
php benchmark.php guzzle

Result

Nyholm

Runs: 30,000
Runs per second: 11214
Average time per run: 0.0892 ms
Total time: 2.6751 s

Guzzle

Runs: 30,000
Runs per second: 8614
Average time per run: 0.1161 ms
Total time: 3.4824 s

Slim

Runs: 30,000
Runs per second: 7424
Average time per run: 0.1347 ms
Total time: 4.0409 s

Zend Diactoros 2

Runs: 30,000
Runs per second: 6422
Average time per run: 0.1557 ms
Total time: 4.6709 s

About

Benchmark of http client under php-http


Languages

Language:PHP 100.0%