zoukankan      html  css  js  c++  java
  • 三种高并发测试工具总结(Postman,Apache Bench,Jmeter)

    1.Postman

    image
    image
    image
    image

    2.Apache Bench

    2.1.使用cmd界面进入AB的bin目录下

    C:WINDOWSsystem32>cd /d D:XXXApache24in

    2.2.输入命令

    D:XXXApache24in>ab.exe -n 1000 -c 50 http://;localhost:8080/test

    -n请求的次数,-c 并发数

    2.3.具体的内容

    //apache版本信息
    Benchmarking www.baidu.com (be patient).....done
    
    
    Server Software: BWS/1.1
    //请求返回header类型,可能是nginx、apache、IIs等
    Server Hostname: www.baidu.com
    //请求ip或者域名
    Server Port: 443
    //请求端口,当前请求为https所以端口为443,请求https端口80
    SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
    //https端口协议
    TLS Server Name: www.baidu.com
    
    Document Path: /
    //路径
    Document Length: 227 bytes
    //第一个成功返回的文档的字节大小
    Concurrency Level: 10
    //并发数!!!
    Time taken for tests: 1.034 seconds
    //从建立连接到最后接受完成总时间
    Complete requests: 100
    //总请求数成功的
    Failed requests: 0
    //失败的
    Total transferred: 87200 bytes
    //从服务器接收的字节总数
    HTML transferred: 22700 bytes
    //HTML接收字节数
    Requests per second: 96.75 [#/sec] (mean)
    ————每秒请求数(总请求数/总时间)
    Time per request: 103.359 [ms] (mean)
    ————用户平均请求等待时间=concurrency * timetaken * 1000 / done
    参考Jmeter、LR中的平均响应时间
    Time per request: 10.336 [ms] (mean, across all concurrent requests)
    ————服务器处理每个请求平均响应时间=timetaken * 1000 / done
    Transfer rate: 82.39 [Kbytes/sec] received
    
    Connection Times (ms)
    min mean[+/-sd] median max
    Connect: 41 75 16.1 74 121
    Processing: 10 23 12.7 19 63
    Waiting: 10 21 10.8 18 54
    Total: 62 99 18.5 97 168
    //网络连接情况
    Percentage of the requests served within a certain time (ms)
    50% 97
    66% 104
    75% 107
    80% 110
    90% 126
    95% 138
    98% 148
    99% 168
    100% 168 (longest request)
    
    

    3.Jmeter

    3.1.运行jmeter

    windows下面直接运行bin目录下面的jmeter.bat

    linux下面直接运行bin目录下面的jmeter.sh 命令sh jmeter.sh

    3.2.添加线程组

    3.2.1 添加线程组

    右键测试计划->线程(用户)->线程组

    输入:线程组名字,线程数,每个线程执行次数,用户增长时间数

    3.2.2 添加取样器

    右键左边新创建的线程组->取样器->http请求

    输入:协议:http,服务器地址,端口号,路径,内容编码:utf-8

    3.2.3 添加监听器

    右键左边新创建的线程组->监听器->图形结果 察看结果数

    3.2.4 打开日志

    选项->日志查看

  • 相关阅读:
    Windows 8 常用快捷键
    An Simple Method for Sparse Matrix Optimization by GPU
    Loser’s “Bruteforced Cholesky Factorization for Sparse Matrix on CUDA”
    如何禁用CentOS6/RHEL6中的Nouveau驱动/How to Disable Nouveau Driver on CentOS6/RHEL6 before install NVIDIA Driver
    Car under Physical Sky
    Alembic for Mudbox
    Hair
    耳放一块
    I Like Red Hair, Definitely.
    Note for the Implemention of EnergyConserved Marschner Hair Reflectance Model
  • 原文地址:https://www.cnblogs.com/xiaodou00/p/13519636.html
Copyright © 2011-2022 走看看