added benchmarking information to splash screen.
This commit is contained in:
parent
188b0c4f29
commit
b4aa39ab83
|
@ -61,6 +61,13 @@
|
||||||
.wrapper h2:first-of-type {
|
.wrapper h2:first-of-type {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: #eee;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -75,5 +82,9 @@
|
||||||
|
|
||||||
<p>Need to learn more? Peruse our <a href="http://laravel.com">wonderful documentation</a>.</p>
|
<p>Need to learn more? Peruse our <a href="http://laravel.com">wonderful documentation</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="wrapper footer">
|
||||||
|
<?php echo System\Benchmark::check('laravel').'ms | '.System\Benchmark::memory(); ?>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -28,12 +28,7 @@ public static function start($name)
|
||||||
*/
|
*/
|
||||||
public static function check($name)
|
public static function check($name)
|
||||||
{
|
{
|
||||||
if (array_key_exists($name, static::$marks))
|
return (array_key_exists($name, static::$marks)) ? number_format((microtime(true) - static::$marks[$name]) * 1000, 2) : 0.0;
|
||||||
{
|
|
||||||
return number_format((microtime(true) - static::$marks[$name]) * 1000, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new \Exception("A Benchmark named [$name] has not been started.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue