mrmanchot/minitimer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mrmanchot/minitimer

Composer 安装命令:

composer require mrmanchot/minitimer

包简介

Simplest way to profile execution time in PHP

README 文档

README

MiniTimer is a lightweight PHP library designed to facilitate tracking and displaying the execution time of different parts of your code. It is particularly useful for debugging and performance optimization by measuring the execution time of specific code blocks.

Features

  • Measures the execution time of specific tasks within your application.
  • Supports task hierarchy for detailed analysis.
  • Displays results in an easy-to-read format.
  • Implements the Singleton pattern for easy use and global access.

Installation

Copy the MiniTimer.php file into your project and include it in your PHP scripts where you wish to use MiniTimer.

Usage

Here's how you can use MiniTimer in your project:

Starting and Stopping a Timer

To measure the execution time of a part of your code, surround it with the start and stop methods:

require_once 'MiniTimer.php';

// Start the timer
MiniTimer::inst()->start('YourTaskName');

// Your code here

// Stop the timer
MiniTimer::inst()->stop('YourTaskName');

Displaying the Results

To display the results of the measurements:

MiniTimer::inst()->display();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固