当前位置:网站首页>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';边栏推荐
猜你喜欢

手撕Gateway源码,今日撕工作流程、负载均衡源码

What warehouse management problems can WMS warehouse management system solve in the electronics industry?

2022 中国算力大会发布“创新先锋”优秀成果

WMS仓储管理系统能解决电子行业哪些仓库管理问题

Analysis of usage scenarios of mutex, read-write lock, spin lock, and atomic operation instructions xaddl and cmpxchg

LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化

一文参透分布式存储系统Ceph的架构设计、集群搭建(手把手)

研究生新生培训第四周:MobileNetV1, V2, V3

ES6高级-迭代器与生成器的用法

typescript58-泛型类
随机推荐
boot issue
nodejs切换版本使用(不需要卸载重装)
研究生新生培训第四周:MobileNetV1, V2, V3
如何通过API接口从淘宝(或天猫店)复制宝贝到拼多多接口代码对接教程
typescript53-泛型约束
手撕Nacos源码,今日撕服务端源码
共享新能源充电桩充电站建设需要些什么流程及资料?
中原银行实时风控体系建设实践
C语言 函数递归
typescript51 - basic use of generics
谁说程序员不懂浪漫,表白代码来啦~
thinkphp 常用技巧
哎,又跟HR在小群吵了一架!
typescript51-泛型的基本使用
600MHz频段来了,它会是新的黄金频段吗?
【OpenCV】-重映射
jmeter分布式压测
一个项目的整体测试流程有哪几个阶段?测试方法有哪些?
XSS - Bypass for loop filtering
分子个数 数论(欧拉函数 前缀和