HTTP响应时间监视工具-httppp
2012-06-27 22:59:45 阿炯

httppp 是一个HTTP的网络响应时间的无源监视工具,使用在非侵入性的方式。基于libpcap和libqpcap开发。


Httppp is a network capture analyzer which extract HTTP request response times from a previously recorded network capture file.

It has been written because no free software which perform this analysis existed. Even Wireshark does not provides those figures.

It is intended for measuring response time of HTTP inter-application calls (so-called web-services), not to measure HTTP browsing user experience quality, for which there are far better tools on the market (such as Fiddler, Firebug and a bunch of expensive but far richer softwares hidden behind buzzwords like "user experience management").

Actually, httppp does not perform any statistical analysis, but produces a CSV file which can be easily imported into a spreadsheet software to be analyzed through pivot table feature and to compute percentiles of the TTLB or TTFB distribution (see snapshots below)

Features
Httppp key features are to:
Read network capture file in libpcap format, which is produced by most network sniffers such as tcpdump or Wireshark.

Analyze TCP packets to find HTTP among them and match requests and replies to compute response time (TTFB/time to first byte and TTLB/time to last byte) along with usual information about an HTTP hit (host, path, return code, source IP address, etc.).

Provide a graphical user interface (GUI) to interactively browse hits and TCP packets with interactive sort to easily find longest service calls (or shortest, or 5xx return codes, etc.).

Produce hits table in CSV format, to make it easy to import into a spreadsheet software.
The CSV format is designed to be easily transformed into a pivot table to group response times by host, path, source IP, return code, custom fields, etc. depending on needs. Disclaimer: I personnaly use a very well known non-free spreadsheet software developed at Redmond, WA and am happy with it. If you use another one, you're maybe a better free software advocate than I am, but don't complain with its pivot table feature not being as powerfull.

The CSV format is also usable to draw a  distribution diagram by letting the spreadsheet software compute percentiles. This is often the first diagram you'll wan't since it displays information such as "80 % of requests are served in less than 600 ms".

Support customizable fields to extract any information from the request or reply. This is done with regular expressions and make it possible to catch any header (such as Referer, Content-size or SOAPAction) or any fragment of a POST payload (again, the SOAP action may be relevant) or the reply payload. See snapshot below. Some interesting regexp are:
Referer: Referer:\s*(\S+)
SOAP action in header: SOAPAction:\s*"(\S+)"
SOAP action in POST: <\w*:?Action[^>]*>([^<]+)</
URI path without query string: GET\s+(/[^?#]*)\S*\s+HTTP/1\.\d

For exact syntax reference, please refer to Qt's QRegExp class documentation, since it's the regexp engine used by httppp.

最新版本:1.4
大幅提升了性能,算法上做了改进,对处理超过 100 兆文件的处理性能提升了 10 倍以上,可使用多核 CPU 同时处理等等。

项目主页:http://httppp.g76r.eu/
该文章最后由 阿炯 于 2012-10-22 14:06:36 更新,目前是第 2 版。