Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
89c61c9c
Commit
89c61c9c
authored
Aug 25, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes of debugger.
parent
c037b481
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
main.css
framework/yii/debug/assets/main.css
+0
-1
DbPanel.php
framework/yii/debug/panels/DbPanel.php
+2
-0
ProfilingPanel.php
framework/yii/debug/panels/ProfilingPanel.php
+3
-6
No files found.
framework/yii/debug/assets/main.css
View file @
89c61c9c
...
...
@@ -144,7 +144,6 @@ ul.trace {
.list-group
.glyphicon
{
float
:
right
;
margin-right
:
-15px
;
}
td
,
th
{
...
...
framework/yii/debug/panels/DbPanel.php
View file @
89c61c9c
...
...
@@ -8,6 +8,7 @@
namespace
yii\debug\panels
;
use
yii\debug\Panel
;
use
yii\helpers\ArrayHelper
;
use
yii\log\Logger
;
use
yii\helpers\Html
;
...
...
@@ -47,6 +48,7 @@ EOD;
public
function
getDetail
()
{
$timings
=
$this
->
calculateTimings
();
ArrayHelper
::
multisort
(
$timings
,
3
,
true
);
$rows
=
array
();
foreach
(
$timings
as
$timing
)
{
$duration
=
sprintf
(
'%.1f ms'
,
$timing
[
3
]
*
1000
);
...
...
framework/yii/debug/panels/ProfilingPanel.php
View file @
89c61c9c
...
...
@@ -47,23 +47,20 @@ EOD;
$timings
=
array
();
$stack
=
array
();
foreach
(
$messages
as
$i
=>
$log
)
{
list
(
$token
,
$level
,
$category
,
$timestamp
)
=
$log
;
$log
[
4
]
=
$i
;
list
(
$token
,
$level
,
$category
,
$timestamp
,
$traces
)
=
$log
;
if
(
$level
==
Logger
::
LEVEL_PROFILE_BEGIN
)
{
$stack
[]
=
$log
;
}
elseif
(
$level
==
Logger
::
LEVEL_PROFILE_END
)
{
if
((
$last
=
array_pop
(
$stack
))
!==
null
&&
$last
[
0
]
===
$token
)
{
$timings
[
$last
[
4
]]
=
array
(
count
(
$stack
),
$token
,
$category
,
$timestamp
-
$last
[
3
]
);
$timings
[
]
=
array
(
count
(
$stack
),
$token
,
$category
,
$timestamp
-
$last
[
3
],
$traces
);
}
}
}
$now
=
microtime
(
true
);
while
((
$last
=
array_pop
(
$stack
))
!==
null
)
{
$delta
=
$now
-
$last
[
3
];
$timings
[
$last
[
4
]]
=
array
(
count
(
$stack
),
$last
[
0
],
$last
[
2
],
$delta
);
$timings
[]
=
array
(
count
(
$stack
),
$last
[
0
],
$last
[
2
],
$now
-
$last
[
3
],
$last
[
4
]);
}
ksort
(
$timings
);
$rows
=
array
();
foreach
(
$timings
as
$timing
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment