kanel/benchmark 问题修复 & 功能扩展

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

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

kanel/benchmark

Composer 安装命令:

composer require kanel/benchmark

包简介

Benchmark your code by tracking duration and memory usage of your code

README 文档

README

build

A simple tool to benchmark time execution and memory usage

#How it works :

  • Start the benchmarkg

        Benchmark::start();     
    
  • Mark a place as a lap (the benchmark will continue)

        $usage = Benchmark::lap();
    

    where $usage is an array :

     [
         'time'   => ...,
         'memory' => ...,
     ]
    
  • If you want the benchmark between the two last laps, send the following parameter:

        $usage = Benchmark::lap(Benchmark::FROM_LAST_LAP);
    
  • To stop the Benchmark and get the time/memory from the beginning (the start)

        $usage = Benchmark::stop();
    
  • To stop the Benchmark tracking and get the memory used and duration from the last lap

        $usage = Benchmark::stop(Benchmark::FROM_LAST_LAP);
    
  • To get the Benchmark history

        $usage = Benchmark::getHistory();
    

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-04-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固