diff --git a/src/Facades/Top.php b/src/Facades/Top.php index b20108b..2700fcc 100644 --- a/src/Facades/Top.php +++ b/src/Facades/Top.php @@ -15,6 +15,9 @@ * @method static DatabaseSummary database() * @method static CacheSummary cache() * @method static RouteCollection routes() + * @method static void startRecording(int $duration = 5) + * @method static void stopRecording() + * @method static bool isRecording() */ class Top extends Facade { diff --git a/src/TopManager.php b/src/TopManager.php index 779f432..e75f732 100644 --- a/src/TopManager.php +++ b/src/TopManager.php @@ -36,4 +36,19 @@ public function routes(): RouteCollection { return $this->repository->getTopRoutes(); } + + public function startRecording(int $duration = 5): void + { + $this->repository->setRecorder($duration); + } + + public function stopRecording(): void + { + $this->repository->deleteRecorder(); + } + + public function isRecording(): bool + { + return $this->repository->recorderExists(); + } }