承接 sandermuller/stopwatch 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

sandermuller/stopwatch

最新稳定版本:v0.3.5

Composer 安装命令:

composer require sandermuller/stopwatch

包简介

Stopwatch to measure execution times (profile code) for Laravel and PHP projects

README 文档

README

Easily profile of parts of your application/code and measure the performance to expose the bottlenecks

Installation

You can install the package via composer:

composer require sandermuller/stopwatch

Usage

Start the stopwatch

stopwatch()->start();

Add a lap/checkpoint

stopwatch()->start(); stopwatch()->checkpoint('First checkpoint'); // Or stopwatch()->lap('Second checkpoint');

Send the timing directly to your log file

stopwatch()->start(); stopwatch()->log('Second checkpoint');

Display the total run duration

stopwatch()->start(); // Do something echo stopwatch()->toString(); // Echoes something like: 116ms

Render as HTML

Render a neat HTML output showing the total execution time, each checkpoint and the time between each checkpoint.

The checkpoints that took up most of the time will be highlighted.

stopwatch()->start(); // Do something stopwatch()->checkpoint('First checkpoint'); // Do something more stopwatch()->checkpoint('Second checkpoint'); // Render the output {{ stopwatch()->render() }}

rendered-stopwatch.png

Manually stop the stopwatch

You can manually stop the stopwatch, but it will also stop automatically when the Stopwatch output is used (e.g. when you echo the Stopwatch object or call ->totalRunDuration()).

stopwatch()->start(); // Do something stopwatch()->checkpoint('First checkpoint'); // Stop the stopwatch stopwatch()->stop(); // Do something else you don't want to measure // Finally render the output {{ stopwatch()->render() }}

统计信息

  • 总下载量: 24.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固