init
This commit is contained in:
65
vendor/yiisoft/yii2-debug/views/default/panels/profile/detail.php
vendored
Normal file
65
vendor/yiisoft/yii2-debug/views/default/panels/profile/detail.php
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/* @var $panel yii\debug\panels\ProfilingPanel */
|
||||
/* @var $searchModel yii\debug\models\search\Profile */
|
||||
/* @var $dataProvider yii\data\ArrayDataProvider */
|
||||
/* @var $time integer */
|
||||
/* @var $memory integer */
|
||||
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
<h1>Performance Profiling</h1>
|
||||
<p>
|
||||
Total processing time: <b><?= $time ?></b>; Peak memory: <b><?= $memory ?></b>.
|
||||
<?= Html::a('Show Profiling Timeline', ['/' . $panel->module->id . '/default/view',
|
||||
'panel' => 'timeline',
|
||||
'tag' => $panel->tag,
|
||||
]) ?>
|
||||
</p>
|
||||
<?php
|
||||
echo GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'id' => 'profile-panel-detailed-grid',
|
||||
'options' => ['class' => 'detail-grid-view table-responsive'],
|
||||
'filterModel' => $searchModel,
|
||||
'filterUrl' => $panel->getUrl(),
|
||||
'columns' => [
|
||||
[
|
||||
'attribute' => 'seq',
|
||||
'label' => 'Time',
|
||||
'value' => function ($data) {
|
||||
$timeInSeconds = $data['timestamp'] / 1000;
|
||||
$millisecondsDiff = (int) (($timeInSeconds - (int) $timeInSeconds) * 1000);
|
||||
|
||||
return date('H:i:s.', $timeInSeconds) . sprintf('%03d', $millisecondsDiff);
|
||||
},
|
||||
'headerOptions' => [
|
||||
'class' => 'sort-numerical'
|
||||
]
|
||||
],
|
||||
[
|
||||
'attribute' => 'duration',
|
||||
'value' => function ($data) {
|
||||
return sprintf('%.1f ms', $data['duration']);
|
||||
},
|
||||
'options' => [
|
||||
'width' => '10%',
|
||||
],
|
||||
'headerOptions' => [
|
||||
'class' => 'sort-numerical'
|
||||
]
|
||||
],
|
||||
'category',
|
||||
[
|
||||
'attribute' => 'info',
|
||||
'value' => function ($data) {
|
||||
return str_repeat('<span class="indent">→</span>', $data['level']) . Html::encode($data['info']);
|
||||
},
|
||||
'format' => 'html',
|
||||
'options' => [
|
||||
'width' => '60%',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
9
vendor/yiisoft/yii2-debug/views/default/panels/profile/summary.php
vendored
Normal file
9
vendor/yiisoft/yii2-debug/views/default/panels/profile/summary.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/* @var $panel yii\debug\panels\ProfilingPanel */
|
||||
/* @var $time integer */
|
||||
/* @var $memory integer */
|
||||
?>
|
||||
<div class="yii-debug-toolbar__block">
|
||||
<a href="<?= $panel->getUrl() ?>" title="Total request processing time was <?= $time ?>">Time <span class="yii-debug-toolbar__label yii-debug-toolbar__label_info"><?= $time ?></span></a>
|
||||
<a href="<?= $panel->getUrl() ?>" title="Peak memory consumption">Memory <span class="yii-debug-toolbar__label yii-debug-toolbar__label_info"><?= $memory ?></span></a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user