zoukankan      html  css  js  c++  java
  • webbench 的安装以及使用

    WebBench的主要工作原理

     

    下载地址:

    https://github.com/EZLippi/WebBench

    安装:

    [root@xxx ~]# unzip master.zip 
       creating: WebBench-master/
      inflating: WebBench-master/LICENSE  
      inflating: WebBench-master/Makefile  
      inflating: WebBench-master/README.md  
       creating: WebBench-master/debian/
      inflating: WebBench-master/debian/changelog  
      inflating: WebBench-master/debian/control  
      inflating: WebBench-master/debian/copyright  
     extracting: WebBench-master/debian/dirs  
      inflating: WebBench-master/debian/rules  
      inflating: WebBench-master/socket.c  
      inflating: WebBench-master/webbench.1  
      inflating: WebBench-master/webbench.c 
    [root@xxx ~]# cd WebBench-master/
    [root@xxx ~]# sudo make && sudo make install PREFIX=./
    [root@xxx ~]# cd bin/
    [root@xxx ~]# ./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 30.
      -p|--proxy <server:port> Use proxy server for request.
      -c|--clients <n>         Run <n> HTTP clients at once. Default one.
      -9|--http09              Use HTTP/0.9 style requests.
      -1|--http10              Use HTTP/1.0 protocol.
      -2|--http11              Use HTTP/1.1 protocol.
      --get                    Use GET request method.
      --head                   Use HEAD request method.
      --options                Use OPTIONS request method.
      --trace                  Use TRACE request method.
      -?|-h|--help             This information.
      -V|--version             Display program version.
    
    [root@xxx ~]# 

    使用:(不支持https哦!)

    [root@xxx ~]# ./webbench -c 20 -f -r --get -2 http://www.baidu.com/
    Webbench - Simple Web Benchmark 1.5
    Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
    
    Request:
    GET / HTTP/1.1
    User-Agent: WebBench 1.5
    Host: www.baidu.com
    Connection: close
    
    
    Runing info: 20 clients, running 30 sec, early socket close, forcing reload.
    
    Speed=4918 pages/min, 0 bytes/sec.
    Requests: 2459 susceed, 0 failed.
    [root@xxx ~]# 

  • 相关阅读:
    重载的概念和体现形式
    构造方法的概述和使用
    可变长参数
    成员方法的定义
    Point类的定义
    Person类的定义
    类和对象以及引用的定义
    高数学习----微积分
    高数学习----向量代数和空间解析几何
    一个无法解析的外部命令and无法解析的外部符号
  • 原文地址:https://www.cnblogs.com/sea-stream/p/13896190.html
Copyright © 2011-2022 走看看