Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
204a64f0
Commit
204a64f0
authored
Jun 25, 2012
by
Franz Liedke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simply use the LARAVEL_START constant for calculation page generation time in profiler.
parent
52f98b7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
profiler.php
laravel/profiling/profiler.php
+1
-16
No files found.
laravel/profiling/profiler.php
View file @
204a64f0
...
@@ -15,15 +15,6 @@ class Profiler {
...
@@ -15,15 +15,6 @@ class Profiler {
*/
*/
protected
static
$data
=
array
(
'queries'
=>
array
(),
'logs'
=>
array
());
protected
static
$data
=
array
(
'queries'
=>
array
(),
'logs'
=>
array
());
/**
* The time when the profiler was setup.
*
* This is used for generating the total page rendering time.
*
* @var float
*/
protected
static
$start_time
;
/**
/**
* Get the rendered contents of the Profiler.
* Get the rendered contents of the Profiler.
*
*
...
@@ -37,10 +28,7 @@ class Profiler {
...
@@ -37,10 +28,7 @@ class Profiler {
// type applications, so we will not send anything in those scenarios.
// type applications, so we will not send anything in those scenarios.
if
(
!
Request
::
ajax
())
if
(
!
Request
::
ajax
())
{
{
if
(
static
::
$start_time
)
static
::
$data
[
'time'
]
=
number_format
((
microtime
(
true
)
-
LARAVEL_START
)
*
1000
,
2
);
{
static
::
$data
[
'time'
]
=
number_format
((
microtime
(
true
)
-
static
::
$start_time
)
*
1000
,
2
);
}
return
render
(
'path: '
.
__DIR__
.
'/template'
.
BLADE_EXT
,
static
::
$data
);
return
render
(
'path: '
.
__DIR__
.
'/template'
.
BLADE_EXT
,
static
::
$data
);
}
}
}
}
...
@@ -80,9 +68,6 @@ class Profiler {
...
@@ -80,9 +68,6 @@ class Profiler {
*/
*/
public
static
function
attach
()
public
static
function
attach
()
{
{
// Record when the profiler was setup (as a rough measure for render time)
static
::
$start_time
=
microtime
(
true
);
// First we'll attach to the query and log events. These allow us to catch
// First we'll attach to the query and log events. These allow us to catch
// all of the SQL queries and log messages that come through Laravel,
// all of the SQL queries and log messages that come through Laravel,
// and we will pass them onto the Profiler for simple storage.
// and we will pass them onto the Profiler for simple storage.
...
...
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