apache bench gnuplot 输出 - 列定义是什么?

发布于 2024-11-05 23:08:16 字数 516 浏览 0 评论 0原文

我正在使用 ApacheBench 来获取一些基本的计时信息。很好的满足了我的需求。我注意到“-g file”创建了一个制表符分隔的文件,每个调用作为一行。但是,我无法确定列的定义。这是我最好的猜测:

starttime:不言自明,此调用开始的时间

:基于数据,我认为这可能是不同格式的“starttime”

ctime:?,对我来说每行都有 0 值,所以不知道

dtimettimewait : dtime 或 ttime 或 wait 似乎是“此调用以毫秒为单位的时间”

AB文档似乎没有涵盖输出格式。有人知道这些列的含义,或者我在哪里可以找到一些文档?

I am using ApacheBench to get some basic timing information. Meeting my needs very well. I noticed that "-g file" creates a tab delim'ed file with each call as a row. I am unable to determine the definition of the columns however. Here is my best guess:

starttime: self-explanatory, the time that this call started

seconds: based on data, I think this may be "starttime" in a different format

ctime: ?, has a 0 value for each row for me, so no idea

dtime, ttime, wait: either dtime or ttime or wait appear to be the "time that this call took in ms"

The AB documentation doesn't seem to cover the output format. Anyone know what these columns mean, or where I can find some documentation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

送舟行 2024-11-12 23:08:16

这是我推导出来的:

  • ctime:连接时间
  • dtime:处理时间
  • ttime:总时间
  • wait:等待时间

我是如何推导出来的:

$ ab -v 2 -n 1 -c 1 -g output.txt http://stackoverflow.com/questions/5929104/apache-bench-gnuplot-output-wha
This is ApacheBench, Version 2.3 <$Revision: 655654 
gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking stackoverflow.com (be patient)...INFO: POST header ==
---
GET /questions/5929104/apache-bench-gnuplot-output-what-are-the-column-definitions HTTP/1.0
Host: stackoverflow.com
User-Agent: ApacheBench/2.3
Accept: */*


---
LOG: header received:
HTTP/1.1 200 OK
Cache-Control: public, max-age=60
Content-Type: text/html; charset=utf-8
Expires: Thu, 26 May 2011 19:24:52 GMT
Last-Modified: Thu, 26 May 2011 19:23:52 GMT
Vary: *
Date: Thu, 26 May 2011 19:23:51 GMT
Connection: close
Content-Length: 29118

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<title>performance testing - apache bench gnuplot output - what are the column definitions? - Stack Overflow
<link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflow/img/favicon.ico">
<link rel="apple-touch-icon" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></scrip
<script type="text/javascript" src="http://cdn.sstatic.net/js/stub.js?v=005820c36f6e"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sstatic.net/stackoverflow/all.css?v=d75e6659067e">


    <link rel="canonical" href="http://stackoverflow.com/questions/5929104/apache-bench-gnuplot-output-what-
    <link rel="alternate" type="application/atom+xml" title="Feed for question 'apache bench gnuplot output
..done


Server Software:
Server Hostname:        stackoverflow.com
Server Port:            80

Document Path:          /questions/5929104/apache-bench-gnuplot-output-what-are-the-column-definitions
Document Length:        29118 bytes

Concurrency Level:      1
Time taken for tests:   0.330 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Total transferred:      29386 bytes
HTML transferred:       29118 bytes
Requests per second:    3.03 [#/sec] (mean)
Time per request:       329.777 [ms] (mean)
Time per request:       329.777 [ms] (mean, across all concurrent requests)
Transfer rate:          87.02 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       79   79   0.0     79      79
Processing:   251  251   0.0    251     251
Waiting:       91   91   0.0     91      91
Total:        330  330   0.0    330     330

比较:

$ cat output.txt
starttime       seconds ctime   dtime   ttime   wait
Thu May 26 12:24:02 2011        1306437842      79      251     330     91

Here is what I have deduced:

  • ctime: Connection Time
  • dtime: Processing Time
  • ttime: Total Time
  • wait: Waiting Time

How I deduced this:

$ ab -v 2 -n 1 -c 1 -g output.txt http://stackoverflow.com/questions/5929104/apache-bench-gnuplot-output-wha
This is ApacheBench, Version 2.3 <$Revision: 655654 
gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking stackoverflow.com (be patient)...INFO: POST header ==
---
GET /questions/5929104/apache-bench-gnuplot-output-what-are-the-column-definitions HTTP/1.0
Host: stackoverflow.com
User-Agent: ApacheBench/2.3
Accept: */*


---
LOG: header received:
HTTP/1.1 200 OK
Cache-Control: public, max-age=60
Content-Type: text/html; charset=utf-8
Expires: Thu, 26 May 2011 19:24:52 GMT
Last-Modified: Thu, 26 May 2011 19:23:52 GMT
Vary: *
Date: Thu, 26 May 2011 19:23:51 GMT
Connection: close
Content-Length: 29118

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<title>performance testing - apache bench gnuplot output - what are the column definitions? - Stack Overflow
<link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflow/img/favicon.ico">
<link rel="apple-touch-icon" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></scrip
<script type="text/javascript" src="http://cdn.sstatic.net/js/stub.js?v=005820c36f6e"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sstatic.net/stackoverflow/all.css?v=d75e6659067e">


    <link rel="canonical" href="http://stackoverflow.com/questions/5929104/apache-bench-gnuplot-output-what-
    <link rel="alternate" type="application/atom+xml" title="Feed for question 'apache bench gnuplot output
..done


Server Software:
Server Hostname:        stackoverflow.com
Server Port:            80

Document Path:          /questions/5929104/apache-bench-gnuplot-output-what-are-the-column-definitions
Document Length:        29118 bytes

Concurrency Level:      1
Time taken for tests:   0.330 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Total transferred:      29386 bytes
HTML transferred:       29118 bytes
Requests per second:    3.03 [#/sec] (mean)
Time per request:       329.777 [ms] (mean)
Time per request:       329.777 [ms] (mean, across all concurrent requests)
Transfer rate:          87.02 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       79   79   0.0     79      79
Processing:   251  251   0.0    251     251
Waiting:       91   91   0.0     91      91
Total:        330  330   0.0    330     330

Compare to:

$ cat output.txt
starttime       seconds ctime   dtime   ttime   wait
Thu May 26 12:24:02 2011        1306437842      79      251     330     91
您的好友蓝忘机已上羡 2024-11-12 23:08:16

这里有一个很好的解释(包括已接受的答案中缺少等待):

在此处输入图像描述

There's a good explanation here (including wait that's missing from the accepted answer):

enter image description here

笑,眼淚并存 2024-11-12 23:08:16

我得到了与 saltycrane 相同的结果,但想要做一些补充(并想总结一下):

  • starttime:不言自明,此调用开始的时间(如问题所述)
  • 秒:starttime 作为 unix 时间戳(< code>date -d @1306437842 返回 starttime 输出)
  • ctime: 连接时间
  • dtime: 处理时间
  • ttime: 总时间 (ttime = ctime + dtime)
  • wait: 等待时间

I came to the same results as saltycrane, but want to make some additions (and want to sum things up):

  • starttime: self-explanatory, the time that this call started (as stated in question)
  • seconds: starttime as unix timestamp (date -d @1306437842 returns starttime output)
  • ctime: Connection Time
  • dtime: Processing Time
  • ttime: Total Time (ttime = ctime + dtime)
  • wait: Waiting Time
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文