Profiler 1.0.0
2021-05-04
533次浏览
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
- auth client
- view
- bootstrap
- release
- html
- redis
- apidoc
- Yii 2.0
- Yii 1.1
- mongodb
- mailer
- extensions
- twig
- gii
- queue
- runner
- http 客户端
- console
- validation
- cache
- sphinx
- widget
- hydrator
- translator
- symfonymailer
- db
- http
- log
- error handler
- config
- swiftmailer
- 图书
- imagine
- assets
- i18n
- IDE
- swagger
- elasticsearch
- router
- csrf
- smarty
- definitions
- logging
- fastroute
- user