GVKun编程网logo

asp.net core系列 67 Web压力测试工具WCAT(web压力测试软件)

24

本文将介绍asp.netcore系列67Web压力测试工具WCAT的详细情况,特别是关于web压力测试软件的相关信息。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一

本文将介绍asp.net core系列 67 Web压力测试工具WCAT的详细情况,特别是关于web压力测试软件的相关信息。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一些关于(转载)Mac下使用Web服务器性能/压力测试工具webbench、ab、siege、ab网站压力测试,ab压力测试工具、ab网站压力测试,ab压力测试工具_PHP教程、Apache Bench — web压力测试工具的知识。

本文目录一览:

asp.net core系列 67 Web压力测试工具WCAT(web压力测试软件)

asp.net core系列 67 Web压力测试工具WCAT(web压力测试软件)

原文: asp.net core系列 67 Web压力测试工具WCAT

.介绍

  最近搭建了一套CQRS框架,需要在投入开发前,进行必要的压力测试。Web Capacity Analysis Tool  (Wcat)是一种轻量级HTTP负载生成工具,主要用于衡量受控环境中Web服务器的性能。WCAT可以模拟数千个并发用户向单个网站或多个网站发出请求。WCAT引擎使用一个简单的脚本来定义要回放到Web服务器的HTTP请求集。WCAT是一个非常轻量级但功能强大的工具,可供IT专业人员和开发人员使用。其丰富的设置可用于大多数情况。它最大的缺点是缺乏用于创建和管理负载测试场景的GUI

  WCAT有四个组件来运行WCAT测试:服务器,客户端,控制器和网络,运行测试时,控制器和客户端运行不同的WCAT程序,而服务器使用WCAT文件响应请求

  服务器

    服务器负责响应连接请求,管理连接以及接收,处理和响应Web内容请求。

  客户端

    指定测试中的客户端浏览器数量来配置各种级别的客户端; 客户请求的大小,类型和速率; 请求发送的频率以及请求的页面; 和测试的持续时间。你不必为要测试的每个客户端配备一台客户端计算机。每个WCAT客户端测试都在自己的进程中运行,因此您可以在客户端计算机上运行多个客户端。这些称为虚拟客户端。

  控制器

    控制器指示客户端机器向服务器发送特定请求,并且服务器响应。收集统计信息并将状态消息发送到客户端计算机。控制器监视测试的持续时间。这是WCAT根据模拟的工作负载确定服务器性能的时间。如果您已指定要监视性能计数器,则控制器将在实验期间监视这些计数器。

  网络

    出于WCAT的目的,网络只是客户端计算机,控制器和服务器之间的通信链接。网络必须使用TCP / IP,建议网络带宽为每秒100兆位。设置测试时,请确保连接到网络的计算机都已正确配置,以便您知道任何性能问题都不是由不正确的安装引起的

 

二.安装

    下载WCAT 6.3:https://www.iis.net/downloads/community/2007/05/wcat-63-x64

    安装后文件在C:\Program Files\wcat下,有三个可执行文件(exe)和一个Windows脚本文件(wsf)以及文档(doc)和示例文件夹(samples)。里面的home.ubr和settings.ubr是我从示例文件夹中拿出来修改的,log.xml文件夹是压力测试后的一个分析报告结果。

    wcctl.exe - 控制器

    wcclient.exe - 客户端

    wcutil.exe - 用于查看测试简要报告的小实用程序

    wcat.wsf - 用于在各种客户端计算机上更新,终止和运行wcclient

 

.准备方案文件

  (1) settings.ubr文件

    在\samples\scripts下有这二个示例文件。settings.ubr文件通常包括:

      (1)客户端需要执行的方案文件。 如: clientfile = "home.ubr";

      (2)服务器机器名称或ip。 如:server = "localhost";

      (3)将HTTP负载发送到服务器的物理客户端数。如:clients= 5;

      (4)此测试的虚拟客户端数,是指线程数。如: virtualclients = 10;

      (5)表现计数器 counters

      (6)注册表设置 registry

    下面是一个settings.ubr的示例:

settings
{
    //--------------------------------------------------------------------------
    // General controller settings
    //
    //  clientfile     - specifies the client file, relative to working dir
    //  server         - host name of the webserver
    //  virtualclients - number of ''threads'' per physical client
    //  clients        - number of physical webcat client machines
    //
    //--------------------------------------------------------------------------
    // Example:
    //
        clientfile     = "home.ubr";
        server         = "localhost";
        clients        = 1;
        virtualclients = 100;
    
    //   
    //--------------------------------------------------------------------------

    //--------------------------------------------------------------------------
    // Performance counters (pass ''-x'' option to wcctl.exe to enable)
    //
    //  interval        - polling interval in seconds (default=10)
    //  host            - host name of machine to monitor (default=webserver)
    //  counter         - path of counter to monitor
    //
    //--------------------------------------------------------------------------
    // Optional:
    //
    //   Additional machines can be monitored by adding more counters blocks.
    //
    // Example:
    //
    //   counters {
    //       host = "sqlserver";   // name of remote machine
    //       interval = 5;
    //       counter = "...";
    //   }
    //
    //--------------------------------------------------------------------------

    counters
    {
        interval = 10;

        counter = "Processor(_Total)\\% Processor Time";
        counter = "Processor(_Total)\\% Privileged Time";
        counter = "Processor(_Total)\\% User Time";
        counter = "Processor(_Total)\\Interrupts/sec";

        counter = "Memory\\Available KBytes";

        counter = "Process(w3wp)\\Working Set";

        counter = "System\\Context Switches/sec";
        counter = "System\\System Calls/sec";

        counter = "Web Service(_Total)\\Bytes Received/sec" ; 
        counter = "Web Service(_Total)\\Bytes Sent/sec" ; 
        counter = "Web Service(_Total)\\Connection Attempts/sec" ; 
        counter = "Web Service(_Total)\\Get Requests/sec" ; 
    }

    //--------------------------------------------------------------------------
    // Registry Key Monitors (pass ''-x'' option to wcctl.exe to enable)
    //
    //  path - registry path, relative to HKLM
    //  name - name of registry key
    //  type - type of value (REG_SZ | REG_DWORD)
    //
    //--------------------------------------------------------------------------
    // Optional:
    //
    //   Additional registry keys can be monitored on the web server by
    //   adding more registry blocks to this file.  Note that simple strings and
    //   dwords are all that webcat currently supports.
    //
    // Example:
    //
    //   registry {
    //     path = "System\\CurrentControlSet\\Services\\Tcpip\\Parameters";
    //     name = "DhcpDomain";
    //     type = REG_SZ;
    //   }
    //
    //--------------------------------------------------------------------------

    registry
    {
        path = "System\\CurrentControlSet\\Control\\FileSystem";
        name = "NtfsDisableLastAccessUpdate";
        type = REG_DWORD;
    }

    registry
    {
        path = "System\\CurrentControlSet\\Services\\Tcpip\\Parameters";
        name = "SynAttackProtect";
        type = REG_DWORD;
    }
}

   (2) home.ubr文件

    该文件是示例场景,定义测试方案。文件通常包含预热时间warmup,测试持续时间duration,冷却时间cooldown。默认部分允许您为测试指定默认HTTP标头setheader。事务(transaction)部分用于指定实际的业务场景。weight属性用于设置此事务的优先级。请求部分(request)用于指定事务中的单个页面请求。其中request页面请求包括:  

      (1)页面的URL

      (2)可选的HTTP动词(默认GET)。在提交数据的情况下,必须将POST指定为动词。

      (3)POST的POSTDATA为提交的数据

      (4)状态代码通常为200(期望的状态),但在某些情况下,您可能需要为移动请求指定300或302

    下面是一个home.ubr的示例:

scenario
{
    name    = "IIS Home Page";

    warmup      = 60;
    duration    = 300;
    cooldown    = 20;

    /////////////////////////////////////////////////////////////////
    //
    // All requests inherit the settings from the default request.
    // Defaults are overridden if specified in the request itself.
    //
    /////////////////////////////////////////////////////////////////
    default
    {
        // send keep-alive header
        setheader
        {
            name    = "Connection";
            value   = "keep-alive";
        }

        // set the host header
        setheader
        {
            name    = "Host";
            value   = server();
        }

        // HTTP1.1 request
        version     = HTTP11;

        // keep the connection alive after the request
        close       = ka;
    }

    //
    // This script is made for IIS7
    //
    transaction
    {
        id = "Default Web Site Homepage";
        weight = 1;

        request
        {
            url         = "http://localhost/customer-management/edit-customer/19";
            statuscode  = 200; 
        verb = GET;
        }
       request
        {
            url         = "http://localhost/member/account/login";
            statuscode  = 200; 
        verb = POST;
            postdata = "UserName=hu&Password=123456";
        }
       request
        {
            url         = "http://localhost/customer-management/edit-customer/19";
            statuscode  = 200; 
        verb = POST;
            postdata = "Id=19&Name=hu1&Email=hu3%40qq.com&BirthDate=1997-01-05&UUID=6b220653-c065-43fc-84f7-eead8f2d64e7";
        }
        //
        // specifically close the connection after both files are requested
        //
        close
        {
            method      = reset;
        }
    }
}

 

.开始压力测试

   打开cmd命令提示符界面,定位到 C:\Program Files\wcat下。接着将asp.net core mvc项目发布到iis上,默认端口为80。

  (1) 步骤1客户端运行:

    最初,需要在所有客户端计算机上更新WCAT设置,wcat客户端计算机的逗号分隔列表.

    C:\Program Files\wcat> wcat –terminate –update –clients {127.0.0.1} -run

  (2) 步骤2控制器运行

    命令中localhostWCATClientMachineName可以用逗号分隔的客户端名称或IP 

    C:\Program Files\wcat> wcat -x -run -clients localhost -f settings.ubr -t home.ubr

    输出以下信息,包括性能统计指标,测压的Server服务器为:localhost。一个物理客户端Clients。

  (3) 步骤3启动客户端.

     客户端将尝试连接到控制器。如果它没有连接,程序将在十秒后再次尝试,并将继续尝试每十秒钟,直到你终止wcclient.exe。要终止wcclient.exe,请在命令提示符下键入CTRL + C.

    下面是启动客户端:在打开一个物理客户端命令提示符界面(有200个虚拟客户端,也就是200个并发)。

    C:\Program Files\wcat> wcclient localhost

    下面测压前的一些配置信息打印,如下图所示:

 

五.查看分析

   接下来会在控制台打印,按之前配置10秒(interval = 10)打印一次信息统计,持续300秒测压的信息统计。下图是第一轮10秒的信息统计,共300秒还会有29轮。

  

  下面在测压过程中来分析查看:测压中包含了登录,产生的会话是6500个。 post修改数据产生的cqrs事件源有4997条。数据库监控一切正常。只是会话多了redis会连接失败与内存有关系

   (1) post修改产生的事件源(也就是修改一条数据,同时新增一个事件源),300秒产生4997条数据。

  (2)会话存储,300秒产生6502个登录会话

  (3) sql server profile的监控,可以查看sql性能

  

.LOG.xml查看分析

  完成300秒测压后,结果将存储在控制器机器当前目录的log.xml文件中。WCAT有一个XSLT“report.xsl”,可以将这个XML转换为可读的安装文件夹。

  Log.xml用来分析结果包含:文件头,结果,性能计数器(如果您指定了所需的那些),文件和类统计信息。 可查看wact安装后doc文件夹中的帮助文档。

  通过分析log.xml可以看到一些统计信息,如请求的http状态,如下图请求http 200的有11078个, 请求登录产生的302有5558个,没有其它http 状态,说明200个并发没有报程序错误。

    下面是http响应的时间:

    下面是300秒内200个并发的总连接请求数,平均每秒请求55个url(16710/300.0)

 

七.分析结论

  上面第一个方案测压持续时间300秒,预热30秒,共200个线程并发,一个线程一次请求3个url(一个登录,一个查询,一个修改提交数据)。300秒内请求url总数为16710个,平均每秒请求55个,平均响应时间3616ms,  http 200状态有11078个, http 302状态有5558个。

  

  第二个方案测压持续时间300秒,预热60秒,共400个线程并发,一个线程一次请求3个url(一个登录,一个查询,一个修改提交数据)。300秒内请求与第一个方案差不多,应该是并发上不去了。

 

  第三个方案压持续时间300秒,预热60秒,共100个线程并发,一个线程一次请求3个url(一个登录,一个查询,一个修改提交数据)。300秒内请求url总数为15222个,平均每秒请求152个,平均响应时间1970 ms,http 200状态有10150个, http 302状态有5608个。

 

 

参考文献

   StressTestingWCAT

  WCAT – Simple Performance Test Tool

  Using WCAT to Stress-Test IIS

 

(转载)Mac下使用Web服务器性能/压力测试工具webbench、ab、siege

(转载)Mac下使用Web服务器性能/压力测试工具webbench、ab、siege

Web开发,少不了的就是压力测试,它是评估一个产品是否合格上线的基本标准,下面我们来一一剖析他们的使用方式。

测试前,前面先把系统的端口限制数改大,看看Mac下面的默认限制

ulimit -a

open files (-n) 2560

2000多的fd数是很小的,我们把他改大,当然我测试过了,也只能开10000而已,Linux可以开6W多,所以:

ulimit -n 10000

在用 ulimit -a 检查一下

open files (-n) 10000

接下来把cpu检查打开,通常我们只看使用率最高的那个即可:

top -n1

-n3 就是前面3个了,以此类推。

OK我们可以继续了。。。

webbench

webbench是一枚强大得可以的压力测试工具,它最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便。

安装:

sudo port install webbench

用法:

webbench -c 并发数 -t 运行测试时间 URL

如:

webbench -c 5000 -t 120 http://www.epooll.com

ab

ab是Apache自带的压力测试工具,非常小巧,可惜的是在mac下面表现不佳,跳动太大,而且还会出现 apr_socket_recv: Connection reset by peer (54) 的错误。ab想说爱你不容易呀,不过Linux下还是比较稳定的,所以还是来说说用法吧。

安装:

http://apache.mirrors.pair.com/httpd/

用法:

ab -c 并发数 -n 请求数 URL

如:

ab -c 1000 -n 10000 http://www.epooll.com

当然其他用法就自己 man ab 然后好好看文档啦

siege

siege是我解决ab该死的 apr_socket_recv: Connection reset by peer (54) 错误时发现的一个好工具,不得不说这工具真心好,用法和webbench一样,但是信息全面很多。

安装:

sudo port install siege

用法:

siege -c 并发数 -t 运行测试时间 URL

如:

siege -c 1000 -t 5s URL

这里要注意的是-t后面的时间要带单位,s表示秒,如果不带,就是分钟,分钟的单位,还是挺长的,所以要注意一下。

ab网站压力测试,ab压力测试工具

ab网站压力测试,ab压力测试工具

ab网站压力测试,ab压力测试工具

ab网站压力测试命令的参数、输出结果的中文注解
    
permalink
   

以前安装好APACHE总是不知道该如何测试APACHE的性能,现在总算找到一个测试工具了。就是APACHE自带的测试工具AB(apache benchmark).在APACHE的bin目录下。
格式: ./ab [options] [http://]hostname[:port]/path
参数:
-n requests Number of requests to perform
//在测试会话中所执行的请求个数。默认时,仅执行一个请求
-c concurrency Number of multiple requests to make
//一次产生的请求个数。默认是一次一个。
-t timelimit Seconds to max. wait for responses
//测试所进行的最大秒数。其内部隐含值是-n 50000。它可以使对服务器的测试限制在一个固定的总时间以内。默认时,没有时间限制。
-p postfile File containing data to POST
//包含了需要POST的数据的文件.
-T content-type Content-type header for POSTing
//POST数据所使用的Content-type头信息。
-v verbosity How much troubleshooting info to print
//设置显示信息的详细程度 - 4或更大值会显示头信息, 3或更大值可以显示响应代码(404, 200等), 2或更大值可以显示警告和其他信息。 -V 显示版本号并退出。
-w Print out results in HTML tables
//以HTML表的格式输出结果。默认时,它是白色背景的两列宽度的一张表。
-i Use HEAD instead of GET
// 执行HEAD请求,而不是GET。
-x attributes String to insert as table attributes
//
-y attributes String to insert as tr attributes
//
-z attributes String to insert as td or th attributes
//
-C attribute Add cookie, eg. ''Apache=1234. (repeatable)
//-C cookie-name=value 对请求附加一个Cookie:行。 其典型形式是name=value的一个参数对。此参数可以重复。
-H attribute Add Arbitrary header line, eg. ''Accept-Encoding: gzip''
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
//-P proxy-auth-username:password 对一个中转代理提供BASIC认证信任。用户名和密码由一个:隔开,并以base64编码形式发送。无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。
-X proxy:port Proxyserver and port number to use
-V Print version number and exit
-k Use HTTP KeepAlive feature
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-h Display usage information (this message)
//-attributes 设置 属性的字符串. 缺陷程序中有各种静态声明的固定长度的缓冲区。另外,对命令行参数、服务器的响应头和其他外部输入的解析也很简单,这可能会有不良后果。它没有完整地实现 HTTP/1.x; 仅接受某些''预想''的响应格式。 strstr(3)的频繁使用可能会带来性能问题,即, 你可能是在测试ab而不是服务器的性能。

参数很多,一般我们用 -c 和 -n 参数就可以了. 例如:

./ab -c 1000 -n 1000 http://127.0.0.1/index.php

这个表示同时处理1000个请求并运行1000次index.php文件.
#/usr/local/xiaobai/apache2054/bin/ab -c 1000 -n 1000 http://127.0.0.1/index.html.zh-cn.gb2312
This is ApacheBench, Version 2.0.41-dev apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (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
Finished 1000 requests


Server Software: Apache/2.0.54
//平台apache 版本2.0.54
Server Hostname: 127.0.0.1
//服务器主机名
Server Port: 80
//服务器端口

Document Path: /index.html.zh-cn.gb2312
//测试的页面文档
Document Length: 1018 bytes
//文档大小

Concurrency Level: 1000
//并发数
Time taken for tests: 8.188731 seconds
//整个测试持续的时间
Complete requests: 1000
//完成的请求数量
Failed requests: 0
//失败的请求数量
Write errors: 0

Total transferred: 1361581 bytes
//整个场景中的网络传输量
HTML transferred: 1055666 bytes
//整个场景中的HTML内容传输量
Requests per second: 122.12 [#/sec] (mean)
//大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8188.731 [ms] (mean)
//大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8.189 [ms] (mean, across all concurrent requests)
//每个请求实际运行时间的平均值
Transfer rate: 162.30 [Kbytes/sec] received
//平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题

Connection Times (ms)
min mean[+/-sd] median max
Connect: 4 646 1078.7 89 3291
Processing: 165 992 493.1 938 4712
Waiting: 118 934 480.6 882 4554
Total: 813 1638 1338.9 1093 7785
//网络上消耗的时间的分解,各项数据的具体算法还不是很清楚

Percentage of the requests served within a certain time (ms)
50% 1093
66% 1247
75% 1373
80% 1493
90% 4061
95% 4398
98% 5608
99% 7368
100% 7785 (longest request)
//整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于1093 毫秒,60% 的用户响应时间小于1247 毫秒,最大的响应时间小于7785 毫秒

由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数

推荐:http://www.cnblogs.com/roucheng/p/texiao.html

ab网站压力测试,ab压力测试工具_PHP教程

ab网站压力测试,ab压力测试工具_PHP教程

ab网站压力测试,ab压力测试工具

ab网站压力测试命令的参数、输出结果的中文注解
    
permalink
   

以前安装好APACHE总是不知道该如何测试APACHE的性能,现在总算找到一个测试工具了。就是APACHE自带的测试工具AB(apache benchmark).在APACHE的bin目录下。
格式: ./ab [options] [http://]hostname[:port]/path
参数:
-n requests Number of requests to perform
//在测试会话中所执行的请求个数。默认时,仅执行一个请求
-c concurrency Number of multiple requests to make
//一次产生的请求个数。默认是一次一个。
-t timelimit Seconds to max. wait for responses
//测试所进行的最大秒数。其内部隐含值是-n 50000。它可以使对服务器的测试限制在一个固定的总时间以内。默认时,没有时间限制。
-p postfile File containing data to POST
//包含了需要POST的数据的文件.
-T content-type Content-type header for POSTing
//POST数据所使用的Content-type头信息。
-v verbosity How much troubleshooting info to print
//设置显示信息的详细程度 - 4或更大值会显示头信息, 3或更大值可以显示响应代码(404, 200等), 2或更大值可以显示警告和其他信息。 -V 显示版本号并退出。
-w Print out results in HTML tables
//以HTML表的格式输出结果。默认时,它是白色背景的两列宽度的一张表。
-i Use HEAD instead of GET
// 执行HEAD请求,而不是GET。
-x attributes String to insert as table attributes
//
-y attributes String to insert as tr attributes
//
-z attributes String to insert as td or th attributes
//
-C attribute Add cookie, eg. ''Apache=1234. (repeatable)
//-C cookie-name=value 对请求附加一个Cookie:行。 其典型形式是name=value的一个参数对。此参数可以重复。
-H attribute Add Arbitrary header line, eg. ''Accept-Encoding: gzip''
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
//-P proxy-auth-username:password 对一个中转代理提供BASIC认证信任。用户名和密码由一个:隔开,并以base64编码形式发送。无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。
-X proxy:port Proxyserver and port number to use
-V Print version number and exit
-k Use HTTP KeepAlive feature
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-h Display usage information (this message)
//-attributes 设置 属性的字符串. 缺陷程序中有各种静态声明的固定长度的缓冲区。另外,对命令行参数、服务器的响应头和其他外部输入的解析也很简单,这可能会有不良后果。它没有完整地实现 HTTP/1.x; 仅接受某些''预想''的响应格式。 strstr(3)的频繁使用可能会带来性能问题,即, 你可能是在测试ab而不是服务器的性能。

参数很多,一般我们用 -c 和 -n 参数就可以了. 例如:

./ab -c 1000 -n 1000 http://127.0.0.1/index.php

这个表示同时处理1000个请求并运行1000次index.php文件.
#/usr/local/xiaobai/apache2054/bin/ab -c 1000 -n 1000 http://127.0.0.1/index.html.zh-cn.gb2312
This is ApacheBench, Version 2.0.41-dev apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

立即学习“PHP免费学习笔记(深入)”;

Benchmarking 127.0.0.1 (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
Finished 1000 requests


Server Software: Apache/2.0.54
//平台apache 版本2.0.54
Server Hostname: 127.0.0.1
//服务器主机名
Server Port: 80
//服务器端口

Document Path: /index.html.zh-cn.gb2312
//测试的页面文档
Document Length: 1018 bytes
//文档大小

Concurrency Level: 1000
//并发数
Time taken for tests: 8.188731 seconds
//整个测试持续的时间
Complete requests: 1000
//完成的请求数量
Failed requests: 0
//失败的请求数量
Write errors: 0

Total transferred: 1361581 bytes
//整个场景中的网络传输量
HTML transferred: 1055666 bytes
//整个场景中的HTML内容传输量
Requests per second: 122.12 [#/sec] (mean)
//大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8188.731 [ms] (mean)
//大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8.189 [ms] (mean, across all concurrent requests)
//每个请求实际运行时间的平均值
Transfer rate: 162.30 [Kbytes/sec] received
//平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题

Connection Times (ms)
min mean[+/-sd] median max
Connect: 4 646 1078.7 89 3291
Processing: 165 992 493.1 938 4712
Waiting: 118 934 480.6 882 4554
Total: 813 1638 1338.9 1093 7785
//网络上消耗的时间的分解,各项数据的具体算法还不是很清楚

Percentage of the requests served within a certain time (ms)
50% 1093
66% 1247
75% 1373
80% 1493
90% 4061
95% 4398
98% 5608
99% 7368
100% 7785 (longest request)
//整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于1093 毫秒,60% 的用户响应时间小于1247 毫秒,最大的响应时间小于7785 毫秒

由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数

推荐:http://www.cnblogs.com/roucheng/p/texiao.html

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1130485.htmlTechArticleab网站压力测试,ab压力测试工具 ab网站压力测试命令的参数、输出结果的中文注解 permalink 以前安装好APACHE总是不知道该如何测试APACHE的性...

Apache Bench — web压力测试工具

Apache Bench — web压力测试工具

待续

关于asp.net core系列 67 Web压力测试工具WCATweb压力测试软件的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于(转载)Mac下使用Web服务器性能/压力测试工具webbench、ab、siege、ab网站压力测试,ab压力测试工具、ab网站压力测试,ab压力测试工具_PHP教程、Apache Bench — web压力测试工具等相关知识的信息别忘了在本站进行查找喔。

本文标签: