lang/php

php codeignier3 framework helloWorld

C/H 2018. 6. 11. 08:00

Codeigniter3

composer require "codeigniter/framework=*"
cp vendor/codeigniter/framework/index.php . 
cp -r vendor/codeigniter/framework/application/ .
vi index.php
vi application/controllers/Welcome.php
$system_path = 'vendor/codeigniter/framework/system/';
<?php
    defined('BASEPATH') OR exit('No direct script access allowed');
    
    class Welcome extends CI_Controller {
        public function index()
        {
            echo "Hello World";
        }
    }
php -S localhost:1337

# other shell
ab -n 10000 -c 10 -k http://127.0.0.1:1337/
...
Concurrency Level:      10
Time taken for tests:   6.287 seconds
Complete requests:      10000
Failed requests:        0
Keep-Alive requests:    0
Total transferred:      1920000 bytes
HTML transferred:       110000 bytes
Requests per second:    1590.58 [#/sec] (mean)
Time per request:       6.287 [ms] (mean)
Time per request:       0.629 [ms] (mean, across all concurrent requests)
Transfer rate:          298.23 [Kbytes/sec] received

Connection Times (ms)
                min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     5    6   1.4      6      47
Waiting:        5    6   1.4      6      47
Total:          5    6   1.4      6      47

Percentage of the requests served within a certain time (ms)
    50%      6
    66%      6
    75%      7
    80%      7
    90%      7
    95%      8
    98%      8
    99%      8
    100%     47 (longest request)


반응형

'lang > php' 카테고리의 다른 글

PHP reactPHP helloWorld  (0) 2018.06.14
PHP workman Container helloWorld  (0) 2018.06.12
PHP Slim Framework helloWorld  (0) 2018.06.07
PHP7 event, libevent Installation  (0) 2018.06.06
PHP Performence On Framework And Event-driven PHP (2) - with Apache2  (0) 2018.06.05