Skip to content

Commit

Permalink
new methods for top
Browse files Browse the repository at this point in the history
  • Loading branch information
leventcz committed May 26, 2024
1 parent 25b6742 commit fafc3b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Facades/Top.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
15 changes: 15 additions & 0 deletions src/TopManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit fafc3b7

Please sign in to comment.