|
| 1 | + |
| 2 | + |
| 3 | +<p align=center> |
| 4 | + <a href="https://github.com/contributte/demo-frankenphp/actions"><img src="https://badgen.net/github/checks/contributte/demo-frankenphp/master"></a> |
| 5 | + <a href="https://coveralls.io/r/contributte/demo-frankenphp"><img src="https://badgen.net/coveralls/c/github/contributte/demo-frankenphp"></a> |
| 6 | + <a href="https://packagist.org/packages/contributte/demo-frankenphp"><img src="https://badgen.net/packagist/dm/contributte/demo-frankenphp"></a> |
| 7 | + <a href="https://packagist.org/packages/contributte/demo-frankenphp"><img src="https://badgen.net/packagist/v/contributte/demo-frankenphp"></a> |
| 8 | +</p> |
| 9 | +<p align=center> |
| 10 | + <a href="https://packagist.org/packages/contributte/demo-frankenphp"><img src="https://badgen.net/packagist/php/contributte/demo-frankenphp"></a> |
| 11 | + <a href="https://github.com/contributte/demo-frankenphp"><img src="https://badgen.net/github/license/contributte/demo-frankenphp"></a> |
| 12 | + <a href="https://bit.ly/ctteg"><img src="https://badgen.net/badge/support/gitter/cyan"></a> |
| 13 | + <a href="https://bit.ly/cttfo"><img src="https://badgen.net/badge/support/forum/yellow"></a> |
| 14 | + <a href="https://contributte.org/partners.html"><img src="https://badgen.net/badge/sponsor/donations/F96854"></a> |
| 15 | +</p> |
| 16 | + |
| 17 | +<p align=center> |
| 18 | +Website 🚀 <a href="https://contributte.org">contributte.org</a> | Contact 👨🏻💻 <a href="https://f3l1x.io">f3l1x.io</a> | Twitter 🐦 <a href="https://twitter.com/contributte">@contributte</a> |
| 19 | +</p> |
| 20 | + |
| 21 | +----- |
| 22 | + |
| 23 | +## Goal |
| 24 | + |
| 25 | +Demo of [FrankenPHP](https://github.com/dunglas/frankenphp) with [Nette Framework](https://nette.org). |
| 26 | + |
| 27 | +## Installation |
| 28 | + |
| 29 | +You will need `PHP 8.2+` and [Composer](https://getcomposer.org/). |
| 30 | + |
| 31 | +Create project using composer. |
| 32 | + |
| 33 | +```bash |
| 34 | +composer create-project -s dev contributte/demo-frankenphp acme |
| 35 | +``` |
| 36 | + |
| 37 | +Now you have application installed. It's time to run it. |
| 38 | + |
| 39 | +## Startup |
| 40 | + |
| 41 | +Spin up Docker stack. FrankenPHP with Caddyserver. |
| 42 | + |
| 43 | +```bash |
| 44 | +docker compose up |
| 45 | +``` |
| 46 | + |
| 47 | +Then visit [http://localhost:8080](http://localhost:8000) in your browser. |
| 48 | + |
| 49 | +List of URL's: |
| 50 | + |
| 51 | +- [http://localhost:8080/](http://localhost:8000) |
| 52 | +- [http://localhost:8080/api](http://localhost:8000/api) |
| 53 | +- [http://localhost:8080/api/phpinfo](http://localhost:8000/api/phpinfo) |
| 54 | + |
| 55 | +## Benchmark |
| 56 | + |
| 57 | +``` |
| 58 | +➜ hey -n 200 -c 100 http://localhost:8080/ |
| 59 | +
|
| 60 | +Summary: |
| 61 | + Total: 0.0526 secs |
| 62 | + Slowest: 0.0512 secs |
| 63 | + Fastest: 0.0010 secs |
| 64 | + Average: 0.0228 secs |
| 65 | + Requests/sec: 3804.3427 |
| 66 | +
|
| 67 | +
|
| 68 | +Response time histogram: |
| 69 | + 0.001 [1] |■ |
| 70 | + 0.006 [69] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ |
| 71 | + 0.011 [26] |■■■■■■■■■■■■■■■ |
| 72 | + 0.016 [4] |■■ |
| 73 | + 0.021 [0] | |
| 74 | + 0.026 [0] | |
| 75 | + 0.031 [0] | |
| 76 | + 0.036 [16] |■■■■■■■■■ |
| 77 | + 0.041 [43] |■■■■■■■■■■■■■■■■■■■■■■■■■ |
| 78 | + 0.046 [14] |■■■■■■■■ |
| 79 | + 0.051 [27] |■■■■■■■■■■■■■■■■ |
| 80 | +
|
| 81 | +
|
| 82 | +Latency distribution: |
| 83 | + 10% in 0.0016 secs |
| 84 | + 25% in 0.0030 secs |
| 85 | + 50% in 0.0346 secs |
| 86 | + 75% in 0.0386 secs |
| 87 | + 90% in 0.0485 secs |
| 88 | + 95% in 0.0493 secs |
| 89 | + 99% in 0.0509 secs |
| 90 | +
|
| 91 | +Details (average, fastest, slowest): |
| 92 | + DNS+dialup: 0.0069 secs, 0.0010 secs, 0.0512 secs |
| 93 | + DNS-lookup: 0.0020 secs, 0.0000 secs, 0.0054 secs |
| 94 | + req write: 0.0001 secs, 0.0000 secs, 0.0033 secs |
| 95 | + resp wait: 0.0157 secs, 0.0009 secs, 0.0365 secs |
| 96 | + resp read: 0.0001 secs, 0.0000 secs, 0.0013 secs |
| 97 | +
|
| 98 | +Status code distribution: |
| 99 | + [500] 200 responses |
| 100 | +``` |
| 101 | + |
| 102 | +## Development |
| 103 | + |
| 104 | +See [how to contribute](https://contributte.org/contributing.html) to this package. |
| 105 | + |
| 106 | +This package is currently maintaining by these authors. |
| 107 | + |
| 108 | +<a href="https://github.com/f3l1x"> |
| 109 | + <img width="80" height="80" src="https://avatars2.githubusercontent.com/u/538058?v=3&s=80"> |
| 110 | +</a> |
| 111 | + |
| 112 | +----- |
| 113 | + |
| 114 | +Consider to [support](https://contributte.org/partners.html) **contributte** development team. Also thank you for using this project. |
0 commit comments