当前位置:网站首页>Thinkphp commonly used techniques
Thinkphp commonly used techniques
2022-08-04 01:02:00 【Robin proposed】
One, check the code running time, memory overhead
View running timeDebug::remark('begin'); -- start markDebug::remark('end'); -- end markDebug::getRangeTime('begin','end',6) -- The third parameter defaults to 4. If you think this statistical precision is not enough, you can also set it.Log::record("/index/my_api".Debug::getRangMem('begin','end',6))Check out the memory overhead:Debug::remark('begin'); -- start markDebug::remark('end'); -- end markDebug::getRangeMem('begin','end') -- statistical unit is kbhelper functiondebug('begin');// ...other code snippetsdebug('end');// ...maybe there is other code here// perform statistical intervalecho debug('begin','end').'s';echo debug('begin','end',6).'s';echo debug('begin','end','m').'kb';
边栏推荐
猜你喜欢
typescript57-数组泛型接口
分子个数 数论(欧拉函数 前缀和
共享新能源充电桩充电站建设需要些什么流程及资料?
nodejs+npm的安装与配置
Web3 security risks daunting?How should we respond?
How to find the cause of Fiori Launchpad routing errors by single-step debugging
新一代服务网关Gateway的实践笔记
Eight things to pay attention to in spot silver
【虚拟户生态平台】虚拟化平台安装时遇到的坑
typescript56 - generic interface
随机推荐
boot issue
【虚拟化生态平台】虚拟化平台搭建
【详细教程】一文参透MongoDB聚合查询
typescript48 - type compatibility between functions
分子个数 数论(欧拉函数 前缀和
即席查询——Presto
VR全景拍摄线上展馆,3D全景带你沉浸体验
如何通过API接口从淘宝(或天猫店)复制宝贝到拼多多接口代码对接教程
boot issue
第1章:初识数据库与MySQL----MySQL安装
typescript57 - Array generic interface
【无标题】
VR panorama shooting online exhibition hall, 3D panorama brings you an immersive experience
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
Demand analysis of MES management system in electronic assembly industry
R3LIVE论文学习(二):VIO子系统
typescript48-函数之间的类型兼容性
typescript54 - generic constraints
nodeJs--async/await
多渠道打包