在网上偶尔看到httperf可以在测试中使用。网上苦苦找不到ubuntu编译安装的方法。自己琢磨了一下,现在总结如下:
apt install httperf
vim /etc/security/limits.conf
* hard nofile 65532
* soft nofile 65532
root hard nofile 65532
root soft nofile 65532
vim /usr/include/x86_64-linux-gnu/bits/typesizes.h
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
改为
#define __FD_SETSIZE 65532
apt install libtool-bin libssl-dev openssl automake libevent-dev autoconf autotools-dev m4
libtoolize
autoreconf -i
aclocal
autoconf
autoheader
automake --add-missing
./configure
make
make install
ln /usr/local/bin/httperf httperf
经过以上编译配置,程序就可以运行了。
测试效果:
参考:
https://poscotso.wordpress.com/2014/09/09/installing-httperf-on-ubuntu/
https://blog.csdn.net/babybirdtofly/article/details/69941756
https://gist.github.com/UKNC/0de259b8a1c9f93f231d89b0ac230ece
来源:oschina
链接:https://my.oschina.net/u/4397358/blog/3991431