mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Add timer for build libs
This commit is contained in:
parent
ea3cb0218a
commit
778cd7b2c7
@ -55,8 +55,9 @@ abstract class BuilderBase
|
|||||||
{
|
{
|
||||||
// build all libs
|
// build all libs
|
||||||
foreach ($this->libs as $lib) {
|
foreach ($this->libs as $lib) {
|
||||||
|
$starttime = microtime(true);
|
||||||
match ($lib->setup($this->getOption('rebuild', false))) {
|
match ($lib->setup($this->getOption('rebuild', false))) {
|
||||||
LIB_STATUS_OK => logger()->info('lib [' . $lib::NAME . '] setup success'),
|
LIB_STATUS_OK => logger()->info('lib [' . $lib::NAME . '] setup success, took ' . round(microtime(true) - $starttime, 2) . ' s'),
|
||||||
LIB_STATUS_ALREADY => logger()->notice('lib [' . $lib::NAME . '] already built'),
|
LIB_STATUS_ALREADY => logger()->notice('lib [' . $lib::NAME . '] already built'),
|
||||||
LIB_STATUS_BUILD_FAILED => logger()->error('lib [' . $lib::NAME . '] build failed'),
|
LIB_STATUS_BUILD_FAILED => logger()->error('lib [' . $lib::NAME . '] build failed'),
|
||||||
LIB_STATUS_INSTALL_FAILED => logger()->error('lib [' . $lib::NAME . '] install failed'),
|
LIB_STATUS_INSTALL_FAILED => logger()->error('lib [' . $lib::NAME . '] install failed'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user