定制 alex-heifetz/stopwatch 二次开发

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

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

alex-heifetz/stopwatch

最新稳定版本:1.0.0

Composer 安装命令:

composer require alex-heifetz/stopwatch

包简介

PHP stopwatch

README 文档

README

GitHub Release GitHub Downloads (all assets, all releases) GitHub License Packagist Dependency Version

Why you might need this

If you don’t want to use complex tools for code profiling, but just need to find a place that slows down the execution of all code.

Installation & loading

Just add this line to your composer.json file:

"alex-heifetz/stopwatch": "^1.0"

or run

composer require seraph90/stopwatch

A Simple Example

<?php

// Import Stopwatch class into the global namespace
use Heifetz\Stopwatch;

// Load Composer's autoloader
require 'vendor/autoload.php';

// Create an instance;
// We can set a threshold that doesn't interest us
$stopwatch = new Stopwatch(210000);

usleep(500000);
// Add first time measurement
$stopwatch->add('500000');

usleep(200000);
// Add another, this one must be skipped by threshold
$stopwatch->add('200000');

usleep(300000);
$stopwatch->add('300000');

// Display all timings 
print_r($stopwatch->getTimings());
// Result like:
//
// Array
// (
//     [500000] => 0.505021
//     [300000] => 0.300916
// )
//

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-09-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固