最简单的方法:
yum install httpd-tools
安装成功后直接敲运行 ab 即可
[root@ai abtest]# ab -n 1000 -c 100 http://xshare.cn/p/63
This is ApacheBench, Version 2.3
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking m.reactshare.cn (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx
Server Hostname: xshare.cn
Server Port: 80
Document Path: /p/63
Document Length: 4515 bytes
Concurrency Level: 100
Time taken for tests: 25.022 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 5511092 bytes
HTML transferred: 4515000 bytes
Requests per second: 39.96 [#/sec] (mean)
Time per request: 2502.213 [ms] (mean)
Time per request: 25.022 [ms] (mean, across all concurrent requests)
Transfer rate: 215.09 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 5 15.6 0 55
Processing: 23 2370 1018.9 2226 11892
Waiting: 16 2370 1019.0 2226 11889
Total: 23 2375 1014.4 2226 11905
Percentage of the requests served within a certain time (ms)
50% 2226
66% 2428
75% 2528
80% 2565
90% 2948
95% 3283
98% 3522
99% 7168
100% 11905 (longest request)
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: VS中scanf()函数错误C4996的原因及解决办法
实例: 报错原因: 这是因为在您的代码中使用了不安全的函数scanf。scanf函数可以读取用户输入的数据,但它无法检查输入数据是否符合要求,可能会导致缓冲区溢出等安全问题,简单来说就是输入字节的长度可能会超过接受变量的长度。 解决方案: (1)使用scanf…