swoole.php 285 B

12345678910111213
  1. <?php
  2. use Swoole\Http\Server;
  3. require_once __DIR__ . '/vendor/autoload.php';
  4. \Hamlet\Bootstraps\SwooleBootstrap::run('0.0.0.0', 8080, function () {
  5. return new \Benchmark\Application;
  6. }, function (Server $server) {
  7. $server->set([
  8. 'worker_num' => NUMCORES
  9. ]);
  10. });