Webbench Source Code Analysis

Source: Internet
Author: User

Source Analysis shared Address: Https://github.com/fivezh/WebBench

After the source code is compiled, it can be executed after download.

sudo make clean

sudo make & make install

1. How to use

[Email protected]:~/github/openccode/webbench$./webbench webbench [option] ... URL-f|--force Don't wait for reply from server.-r|--reload Send Reload request-pragma:no-Cache. -t|-- Time<sec> Run Benchmark for<sec> seconds. Default -. -p|--proxy <server:port> Use proxy server forrequest. -c|--clients <n> Run <n>HTTP clients at once.  Default one. -9|--http09 Use http/0.9style requests. -1|--HTTP10 Use http/1.0protocol. -2|--HTTP11 Use http/1.1protocol. --get use Get request method. --HeadUse HEAD request method. --Options Use Options request method. --Trace Use trace request method. -?| -h|--Help this information. -v|--version Display program version.

Example:./webbench-t 10-c http://www.baidu.com/

[Email protected]:~/github/openccode/webbench$./webbench-tTen-C -http//www.baidu.com/Webbench-simple Web Benchmark1.5Copyright (c) Radim Kolar1997-2004, GPL Open Source Software.Benchmarking:GET http://www.baidu.com/ -Clients, runningTensec. speed=492Pages/min,918494bytes/sec. Requests: theSusceed,0Failed.

2. Source Code Analysis

Knowledge point 1:

Volatile usage,

Reference:

http://blog.csdn.net/bigloomy/article/details/6645810

Http://www.cnblogs.com/chio/archive/2007/11/24/970632.html

Webbench Source Code Analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.