略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: LuaSandbox::enableProfiler

2024-11-15

LuaSandbox::enableProfiler

(PECL luasandbox >= 1.1.0)

LuaSandbox::enableProfilerEnable the profiler.

说明

public LuaSandbox::enableProfiler(float $period = 0.02): bool

Enables the profiler. Profiling will begin when Lua code is entered.

The profiler periodically samples the Lua environment to record the running function. Testing indicates that at least on Linux, setting a period less than 1ms will lead to a high overrun count but no performance problems.

参数

period

Sampling period in seconds.

返回值

Returns a boolean indicating whether the profiler is enabled.

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/luasandbox.enableprofiler.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3