\thinkDebug

Summary

Methods
Properties
Constants
__construct()
__make()
setConfig()
remark()
getRangeTime()
getUseTime()
getThroughputRate()
getRangeMem()
getUseMem()
getMemPeak()
getFile()
dump()
inject()
__debugInfo()
No public properties found
No constants found
No protected methods found
$config
$info
$mem
$app
N/A
No private methods found
No private properties found
N/A

Properties

$config

$config : array

配置参数

Type

array

$info

$info : array

区间时间信息

Type

array

$mem

$mem : array

区间内存信息

Type

array

$app

$app : \think\App

应用对象

Type

App

Methods

__construct()

__construct(\think\App  $app, array  $config = []) : mixed

Parameters

\think\App $app
array $config

Returns

mixed —

__make()

__make(\think\App  $app, \think\Config  $config) : mixed

Parameters

\think\App $app
\think\Config $config

Returns

mixed —

setConfig()

setConfig(array  $config) : mixed

Parameters

array $config

Returns

mixed —

remark()

remark(string  $name, mixed  $value = '') : void

记录时间(微秒)和内存使用情况

Parameters

string $name

标记位置

mixed $value

标记值 留空则取当前 time 表示仅记录时间 否则同时记录时间和内存

getRangeTime()

getRangeTime(string  $start, string  $end, int|string  $dec = 6) : int

统计某个区间的时间(微秒)使用情况

Parameters

string $start

开始标签

string $end

结束标签

int|string $dec

小数位

Returns

int —

getUseTime()

getUseTime(int|string  $dec = 6) : int

统计从开始到统计时的时间(微秒)使用情况

Parameters

int|string $dec

小数位

Returns

int —

getThroughputRate()

getThroughputRate() : string

获取当前访问的吞吐率情况

Returns

string —

getRangeMem()

getRangeMem(string  $start, string  $end, int|string  $dec = 2) : string

记录区间的内存使用情况

Parameters

string $start

开始标签

string $end

结束标签

int|string $dec

小数位

Returns

string —

getUseMem()

getUseMem(int|string  $dec = 2) : string

统计从开始到统计时的内存使用情况

Parameters

int|string $dec

小数位

Returns

string —

getMemPeak()

getMemPeak(string  $start, string  $end, int|string  $dec = 2) : string

统计区间的内存峰值情况

Parameters

string $start

开始标签

string $end

结束标签

int|string $dec

小数位

Returns

string —

getFile()

getFile(bool  $detail = false) : int|array

获取文件加载信息

Parameters

bool $detail

是否显示详细

Returns

int|array —

dump()

dump(mixed  $var, bool  $echo = true, string  $label = null, int  $flags = ENT_SUBSTITUTE) : void|string

浏览器友好的变量输出

Parameters

mixed $var

变量

bool $echo

是否输出 默认为true 如果为false 则返回输出字符串

string $label

标签 默认为空

int $flags

htmlspecialchars flags

Returns

void|string —

inject()

inject(\think\Response  $response, mixed  $content) : mixed

Parameters

\think\Response $response
mixed $content

Returns

mixed —

__debugInfo()

__debugInfo() : mixed

Returns

mixed —