统计 php 文件执行时间的扩展 zqfHB

码农软件 · 软件分类 · C/C++开发工具 · 2019-11-09 20:27:18

软件介绍

zqfHB

一个统计 php 文件执行时间的扩展

由于依赖hiredis的c的api调用redis,所以首先需要安装hiredis
wget https://github.com/redis/hiredis/archive/v0.13.3.tar.gz
tar zxvf v0.13.3.tar.gz
cd hiredis-0.13.3
make
或者直接make install,建议手动按下面配置
mkdir -p /usr/local/include/hiredis  /usr/local/lib
cp -a hiredis.h async.h read.h sds.h adapters /usr/local/include/hiredis
cp -a libhiredis.so /usr/local/lib/libhiredis.so.0.13
cd /usr/local/lib && ln -sf libhiredis.so.0.13 libhiredis.so
切换到cd hiredis-0.13.3目录下
cp -a libhiredis.a /usr/local/lib
mkdir -p /usr/local/lib/pkgconfig
cp -a hiredis.pc /usr/local/lib/pkgconfig
如果出现libhiredis.so.0.13: cannot open shared object file: No such file or directory in Unknown on line 0
vi /etc/ld.so.conf
文件末尾添加  /usr/local/lib
然后执行ldconfig
下面安装本扩展
./phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
add zqfHB.so to php.ini
extension=zqfHB.so
[zqfHB]
zqfHB.slow_maxtime=10000(单位微妙1s=1000000us,改参数是页面加载超过这个时间会统计)
zqfHB.type=1(1代表redis 2代表memcache,由于memcache性能处理有点低,暂时不开放)
zqfHB.auth=123456(如果redis没有密码,此项不必配置,如果有密码,必须配置此项)
zqfHB.host=192.168.102.163
zqfHB.port=6379

use:

需要把web里的所有文件复制到网站目录下,网站统计可以不在一起
直接执行http://localhost/web/


效果图

本文地址:https://www.codercto.com/soft/d/18638.html

编程卓越之道

编程卓越之道

海德 / 张菲 / 电子工业出版社 / 2007-4 / 69.00元

《编程卓越之道第二卷:运用底层语言思想编写高级语言代码》是《编程卓越之道》系列书的第二卷,将探讨怎样用高级语言(而非汇编语言)编程得到高效率机器代码。在书中,您可以学到如何分析编译器的输出,以便检验代码的所作所为,从而得到高质量的机器码;了解编译器为常见控制结构生成的典型机器指令,以便在编写高级语言程序时选用恰当的语句;掌握编译器将各种常量和变量类型转换成机器数据的方法,以便于使用这些数据写出又快......一起来看看 《编程卓越之道》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具
html转js在线工具

html转js在线工具