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
b4aa39ab
Commit
b4aa39ab
authored
Aug 03, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added benchmarking information to splash screen.
parent
188b0c4f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
index.php
application/views/home/index.php
+11
-0
benchmark.php
system/benchmark.php
+1
-6
No files found.
application/views/home/index.php
View file @
b4aa39ab
...
...
@@ -61,6 +61,13 @@
.wrapper
h2
:first-of-type
{
margin-top
:
0
;
}
.footer
{
background-color
:
#eee
;
text-align
:
right
;
font-size
:
12px
;
color
:
#bbb
;
}
</style>
</head>
<body>
...
...
@@ -75,5 +82,9 @@
<p>
Need to learn more? Peruse our
<a
href=
"http://laravel.com"
>
wonderful documentation
</a>
.
</p>
</div>
<div
class=
"wrapper footer"
>
<?php
echo
System\Benchmark
::
check
(
'laravel'
)
.
'ms | '
.
System\Benchmark
::
memory
();
?>
</div>
</body>
</html>
\ No newline at end of file
system/benchmark.php
View file @
b4aa39ab
...
...
@@ -28,12 +28,7 @@ class Benchmark {
*/
public
static
function
check
(
$name
)
{
if
(
array_key_exists
(
$name
,
static
::
$marks
))
{
return
number_format
((
microtime
(
true
)
-
static
::
$marks
[
$name
])
*
1000
,
2
);
}
throw
new
\Exception
(
"A Benchmark named [
$name
] has not been started."
);
return
(
array_key_exists
(
$name
,
static
::
$marks
))
?
number_format
((
microtime
(
true
)
-
static
::
$marks
[
$name
])
*
1000
,
2
)
:
0.0
;
}
/**
...
...
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