zoukankan      html  css  js  c++  java
  • Apache ab.exe 使用

         ab 的全称是 ApacheBench , 是 Apache 附带的一个小工具 , 专门用于 HTTP Server 的 benchmark testing , 可以同时模拟多个并发请求。简单的说它就是一个性能检测的小工具,使用简单方便。

    使用方法:

    1、打开命令行,输入cmd,回车

    2、输入命令,示例:E: estab.exe -n 1000 -c 50 http://192.168.1.149:18080/v1/CS/254767713_354476(请求1000次,并发50)

    常用命令:

     -n:请求个数,默认是一次一个

     -c:并发数

     -t:超时限制

    返回说明:

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

    Benchmarking 192.168.1.149 (be patient)


    Server Software:        Kestrel
    Server Hostname:        192.168.1.149    
    Server Port:            18080       /* 端口*/

    Document Path:          /v1/CS/254767713_354476 
    Document Length:        354476 bytes   /*请求文件大小  */

    Concurrency Level:      50    /* 并发数 */
    Time taken for tests:   7.314 seconds    /*  整个测试所用的时间  */
    Complete requests:      1000    /*  完成的请求数量  */
    Failed requests:        0      /*  失败的请求数量  */
    Total transferred:      354618000 bytes   /*  整个场景的网络传输量  */
    HTML transferred:       354476000 bytes   /*  整个场景的HTML传输量  */
    Requests per second:    136.72 [#/sec] (mean)     /*  平均每秒请求数 */
    Time per request:       365.721 [ms] (mean)   /* 平均每个请求的响应时间 */
    Time per request:       7.314 [ms] (mean, across all concurrent requests)   
    Transfer rate:          47345.75 [Kbytes/sec] received   /*平均每秒网络上的流量  */

    /* 网络上消耗时间分解 */
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    2   2.3      1      24
    Processing:    78  360  87.0    383     528
    Waiting:        3   88  39.3     89     199
    Total:         79  362  86.6    385     528

    /*  下面为整个场景所有请求的响应情况,50%的相应时间小于385毫秒,66%的响应时间小于402毫秒。。。。。。最长响应时间 528毫秒*/
    Percentage of the requests served within a certain time (ms)
      50%    385
      66%    402
      75%    412
      80%    421
      90%    444
      95%    459
      98%    479
      99%    497
     100%    528 (longest request)



  • 相关阅读:
    TCP三次握手和四次挥手
    shell脚本进阶
    shell脚本编程基础
    centos6/7通用查看系统版本
    OSI与TCP/IP网络模型分层
    RAID基础知识总结
    yum的初步了解与使用
    Red Hat Enterprise Linux 官方正式版镜像下载
    MYSQL的基本使用,以及错误代码的意思
    人生第一次研读MFC截图工具的笔记心得
  • 原文地址:https://www.cnblogs.com/zhuzhu1214/p/11611208.html
Copyright © 2011-2022 走看看