Apache AB的安装和使用(Ubuntu16.04)

步骤很简单一共两步,安装一步,使用一步。

sudo apt-get install apache2-utils

ab -n 10000 -c 100 https://www.baidu.com/

 

注意:

使用ubuntu16.04安装ab是非常便捷的,为了防止安装失败造成的影响,安装成功后,最好还是ab -V确认一下。

 

测试结果如下:

复制代码
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.baidu.com (be patient).....done


Server Software:        BWS/1.1
Server Hostname:        www.baidu.com
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path:          /
Document Length:        227 bytes

Concurrency Level:      10
Time taken for tests:   5.685 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      89300 bytes
HTML transferred:       22700 bytes
Requests per second:    17.59 [#/sec] (mean)
Time per request:       568.508 [ms] (mean)
Time per request:       56.851 [ms] (mean, across all concurrent requests)
Transfer rate:          15.34 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       26  349 605.2     71    4168
Processing:     8  100 125.5     21     611
Waiting:        7   93 125.0     12     608
Total:         42  449 687.6     90    4478

Percentage of the requests served within a certain time (ms)
  50%     90
  66%    571
  75%    677
  80%    759
  90%   1179
  95%   1703
  98%   3771
  99%   4478
 100%   4478 (longest request)
复制代码

 

posted @   挑战者V  阅读(1628)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述
点击右上角即可分享
微信分享提示