ngranko/phprofiler 问题修复 & 功能扩展

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

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

ngranko/phprofiler

Composer 安装命令:

composer require ngranko/phprofiler

包简介

A simple profiler for php without a need for any external dependencies

README 文档

README

A simple library for doing profiling without a need for thousands of external dependencies.

Build Status Code Climate

Installation

The simplest way to install it is to use Composer:

composer require ngranko/phprofiler

Or you can move the contents of this repository to a folder of your liking and then have a lot of fun making the autoloading work, etc.

Usage

Initialization

To use the library simply create a new PHProfiler object:

<?php
$profiler = new PHProfiler();

This will initialize the profiler and set current time and memory consumption values as reference to calculate relative time and memory usage against.

Capturing a point

To capture a point, do:

<?php
$profiler = new PHProfiler();
$profiler->rememberPoint();

This will capture a current state of the system: time elapsed and memory usage.

Exporting results

Depending on a type of export you want to do, do one of those:

<?php
$profiler = new PHProfiler();
$profiler->rememberPoint();
$profiler->export(ExporterType::LOG);

The first, required, argument to the export() function is a type of export you want to do. Use ExporterType constants to specify it and see which types are available.

By default, a file will be created in your current working directory, named profiler_output_[timestamp].[extension]. If you want to save result to some other place, simply specify a desired path (with a filename) as a second argument to the export() function.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固