Profiler 1.0.0
             2021-05-04
             927次浏览
        
        Another Yii3 family package was released. This time it is profiler. The package provides an ability to record performance profiles:
$profiler->begin('test');
//...some code
    $profiler->begin('test');
    //...some code
    $profiler->end('test');
 //...some code
 $profiler->end('test');
$messages = $profiler->getMessages(); 
print_r($messages);
gives you
Array
(
    [0] => Yiisoft\Profiler\Message Object
        (
            [level:Yiisoft\Profiler\Message:private] => application
            [token:Yiisoft\Profiler\Message:private] => test
            [context:Yiisoft\Profiler\Message:private] => Array
                (
                    [token] => test
                    [category] => application
                    [nestedLevel] => 0
                    [time] => 1614703708.4328
                    [beginTime] => 1614703708.4328
                    [beginMemory] => 7696440
                    [endTime] => 1614703708.4331
                    [endMemory] => 7702392
                    [duration] => 0.0003058910369873
                    [memoryDiff] => 5952
                )
        )
)
The data collected could be processed (usually saved) to one or more targets.
As usual, the package is fully covered with tests and types.
新闻归档
热门标签
- yii3
 - 扩展
 - 发布
 - yii2
 - debug
 - view
 - auth client
 - html
 - bootstrap
 - release
 - mongodb
 - redis
 - apidoc
 - Yii 1.1
 - validation
 - Yii 2.0
 - http
 - runner
 - extensions
 - console
 - error handler
 - gii
 - mailer
 - cache
 - http 客户端
 - queue
 - twig
 - hydrator
 - translator
 - widget
 - sphinx
 - router
 - log
 - symfonymailer
 - assets
 - config
 - db
 - swagger
 - middleware
 - imagine
 - elasticsearch
 - 图书
 - swiftmailer
 - widgets
 - definitions
 - i18n
 - IDE
 - fastroute
 - csrf
 - user