Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
b4aa39ab
Commit
b4aa39ab
authored
Aug 02, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added benchmarking information to splash screen.
parent
188b0c4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
application/views/home/index.php
+12
-0
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