定制 bilbofox/timer-panel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bilbofox/timer-panel

最新稳定版本:0.3

Composer 安装命令:

composer require bilbofox/timer-panel

包简介

Tracy debugger panel for measuring runtime

README 文档

README

logo

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2024-12-31