Webbench1.5安装使用Ubuntu

1、安装依赖包

bash 复制代码
sudo apt-get update
sudo apt-get install libtirpc-dev

2、安装Webbench1.5

参考https://github.com/baiguo/webbench-1.5

bash 复制代码
# 可能需要root权限,我是切换到root用户才安装成功
wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
tar -zvxf webbench-1.5.tar.gz
cd webbench-1.5
sudo gedit Makefile
sudo gedit webbench.c

执行find /usr -name types.h | grep rpc,发现type.h在下面路径

所以我们需要修改webbench-1.5目录下的Makefilewebbench.c

bash 复制代码
# Makefile添加
CFLAGS += -I/usr/include/tirpc
cpp 复制代码
webbench.c修改#include <rpc/types.h>为#include <tirpc/rpc/types.h>

编译安装

bash 复制代码
sudo make && sudo make install  # 可能会有ctags警告,但不影响功能
webbench --help  # 显示一下信息安装成功

3、webbench使用

bash 复制代码
webbench -c 客户端数量 -t 测试时间(秒) 要测试的网址如(http://127.0.0.1:8080/)

结果类似下图

结果解析
Speed: 表示每分钟处理的页面数(pages/min)以及每秒传输的字节数(bytes/sec)。
Requests: 成功请求的数量以及失败请求的数量

参考

https://github.com/baiguo/webbench-1.5

相关推荐
orion5716 小时前
Missing Semester Class1:course overview and introduction of shell
linux
SkyWalking中文站21 小时前
认识 Horizon UI · 6/17:Trace 探索器
运维·监控·自动化运维
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
火车叼位1 天前
写给初级开发者:SSL、SSH、HTTPS 与证书体系全解析
运维
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
小猿姐1 天前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
SkyWalking中文站2 天前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维
tntxia3 天前
linux curl命令详解_curl详解
linux