zoukankan      html  css  js  c++  java
  • ab压力测试

    一、安装:

    yum -y install httpd-tools

    二、命令

    # 每次同时发送100个请求,总共1000个请求

    ab -n 1000 -c 100 

    # ab -k -c 100 -n 10000 http://127.0.0.1:9501/
    This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking 127.0.0.1 (be patient)
    Completed 1000 requests
    Completed 2000 requests
    Completed 3000 requests
    Completed 4000 requests
    Completed 5000 requests
    Completed 6000 requests
    Completed 7000 requests
    Completed 8000 requests
    Completed 9000 requests
    Completed 10000 requests
    Finished 10000 requests
    
    
    Server Software:        Hyperf
    Server Hostname:        127.0.0.1
    Server Port:            9501
    
    Document Path:          /
    Document Length:        42 bytes
    
    Concurrency Level:      100
    Time taken for tests:   0.624 seconds
    Complete requests:      10000
    Failed requests:        0
    Write errors:           0
    Keep-Alive requests:    10000
    Total transferred:      1900000 bytes
    HTML transferred:       420000 bytes
    Requests per second:    16020.94 [#/sec] (mean)
    Time per request:       6.242 [ms] (mean)
    Time per request:       0.062 [ms] (mean, across all concurrent requests)
    Transfer rate:          2972.64 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    1   7.0      0     104
    Processing:     0    5   4.0      4     108
    Waiting:        0    5   3.8      4      37
    Total:          0    6   8.4      4     127
    
    Percentage of the requests served within a certain time (ms)
      50%      4
      66%      5
      75%      6
      80%      6
      90%     10
      95%     14
      98%     20
      99%     24
     100%    127 (longest request)

    Server Software: 对方服务器网络软件和版本 比如nginx/1.8.1

    Document Path:请求目录
    Document Length:请求文件大小

    Concurrency Level:并发量
    Time taken for tests:总共花费时间
    Complete requests:总共请求次数
    Failed requests:请求失败次数
    Total transferred:总共数据量
    HTML transferred:总共html代码量
    Requests per second:每秒完成的请求书 ----非常重要


    参考:https://blog.csdn.net/feiwutudou/article/details/80334099
  • 相关阅读:
    VS2019 技巧
    html5-Canvas
    JS动画三剑客——setTimeout、setInterval、requestAnimationFrame
    C# 从1到Core--委托与事件
    ILSpy工具使用
    .NET 表达式计算:Expression Evaluator
    jQuery.globalEval()方法
    jquery的eval的使用
    js中的eval方法
    设计模式速查手册
  • 原文地址:https://www.cnblogs.com/cshaptx4869/p/12240657.html
Copyright © 2011-2022 走看看