This commit is contained in:
as2252258@163.com
2021-04-23 03:12:00 +08:00
parent 8b57f44f7e
commit 325ab04f20
26 changed files with 775 additions and 1493 deletions
-1
View File
@@ -29,7 +29,6 @@ class Logger extends Component
private array $logs = [];
public int $worker_id;
/**
* @param $message
+4 -3
View File
@@ -25,8 +25,6 @@ class LoggerAspect implements IAspect
*/
#[Pure] public function __construct(public array $handler)
{
$this->className = get_class($this->handler[0]);
$this->methodName = $this->handler[1];
}
@@ -47,8 +45,11 @@ class LoggerAspect implements IAspect
private function print_runtime($startTime)
{
$className = get_class($this->handler[0]);
$methodName = $this->handler[1];
$runTime = round(microtime(true) - $startTime, 6);
echo sprintf('run %s::%s use time %6f', $this->className, $this->methodName, $runTime);
echo sprintf('run %s::%s use time %6f', $className, $methodName, $runTime);
echo PHP_EOL;
}