added benchmarking information to splash screen.
This commit is contained in:
parent
188b0c4f29
commit
b4aa39ab83
|
@ -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>
|
|
@ -28,12 +28,7 @@ public static function start($name)
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue