bilbofox/timer-panel
最新稳定版本:0.3
Composer 安装命令:
composer require bilbofox/timer-panel
包简介
Tracy debugger panel for measuring runtime
README 文档
README
Tracy debugger panel for measuring runtime of code snippets
Quickstart
Registering panel into Tracy bar can be done simply by calling prepared static method:
// Register panel to global Tracy instance... $tracyPanel = Bilbofox\TimerPanel\TimerPanel::register(); // ...
// ... // Retrieve instance of panel back $tracyPanel = Bilbofox\TimerPanel\TimerPanel::instance(); // ... $tracyPanel->start(); // HEAVY LIFTING... // // A // || // || // ============================== $tracyPanel->stop();
Public methods
Timer panel instance has methods for public usage - starting / stopping timers etc. Each such method also has global function equvialent shortcut:
| Method | Global shortcut | Description |
|---|---|---|
TimerPanel::start(?string $key = null, ?string $title = null, int $mode = self::MODE_DEFAULT): string |
startTimer() |
Starts timer of given key - default mode overwrites already existing timers, returns key of timer used |
TimerPanel::startSum(?string $key = null, ?string $title = null): string |
startTimerSum() |
Starts timer of given key in sum mode - timers of same key are calculated into final sum, returns key of timer used |
TimerPanel::startStack(?string $key = null, ?string $title = null): string |
startTimerStack() |
Starts timer of given key in stack mode - timers are stacked into subsection, returns key of timer used |
TimerPanel::getLastStarted(): ?string |
getLastStartedTimer() |
Returns key of last started timer or null if no timer has been started |
TimerPanel::stop(?string $key = null): string |
stopTimer() |
Stops timer of given key or last started if null is passed |
TimerPanel::stopAll(): void |
stopAllTimers() |
Stops all running timers |
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unlicense
- 更新时间: 2024-12-31
