zoukankan      html  css  js  c++  java
  • linux安装siege和使用

    一、siege的安装
        解压: tar -zxvf siege-latest.tar.gz
        cd siege-*.*.*
        ./configure --prefix=/usr/local/siege --mandir=/usr/local/man --with-ssl=/usr/local/ssl
        mkdir -p /usr/local/siege/etc
        mkdir -p /usr/local/siege/var
        make
        make install
        
        查看配置文件
        /usr/local/siege/bin/siege -C
     
    二、siege的使用
        举例说明:
     
        50个用户(每次并发量)重复100次 共产生 50*100 个请求
        /usr/local/siege/bin/siege -c 50 -r 100 www.baidu.com


        50个用户 重复100次 发送GET参数
        /usr/local/siege/bin/siege -c 50 -r 100  http://www.baidu.com/s?wd=siege&rsv_spt=1&issp=1&rsv_bp=0&ie=utf-8&tn=baiduhome_pg&rsv_sug3=4&rsv_sug=2&rsv_sug1=4&rsv_sug4=60

        50个用户 重复100次 发送POST参数 (注意引号)
        /usr/local/siege/bin/siege -c 50 -r 100  "https://www.abc.com/a.php POST name=zhangsan"

        50个用户 重复100次 发送POST参数(从文件中读取)
        /usr/local/siege/bin/siege -c 50 -r 100  "https://www.abc.com/a.php POST < /root/ab_test/post.xml"

        另外还有挺多参数
        详情请man 或 siege -h

        siege报表解析,请man查看,暂略(有点累了,不想写了。。。。。)。

        Transactions:                     10 hits    :服务器接收的请求数
        Availability:                 100.00 %       :有效情况的比例
        Elapsed time:                   1.06 secs    :  测试所用的时间
        Data transferred:               0.04 MB    :每个模拟用户的数据传输量
        Response time:                  0.03 secs    :响应每个模拟用户请求的平均时间
        Transaction rate:               9.43 trans/sec    :服务器每秒处理事务的平均数
        Throughput:                     0.04 MB/sec    :服务器每秒跟所有模拟用户的数据传输量
        Concurrency:                    0.25    :每秒的模拟连接
        Successful transactions:          10    :处理成功的事务数(code<400)
        Failed transactions:               0    : 处理失败的事务数(code>400)
        Longest transaction:            0.04    :最长的事务处理时间
        Shortest transaction:           0.02    :最短的事务处理时间

        常见问题见:http://www.joedog.org/siege-faq/
  • 相关阅读:
    [Deep-Learning-with-Python] Keras高级概念
    [Deep-Learning-with-Python]计算机视觉中的深度学习
    求数值的n次方根
    caffe dropout解读
    Paper Mark2
    分组卷积+squeezenet+mobilenet+shufflenet的参数及运算量计算
    SSD总结
    sed例子
    Ubuntu 16.04安装MySQL设置远程访问出现问题的完美解决方案(error:10061)
    解决Python-OpenCV中cv2.rectangle报错
  • 原文地址:https://www.cnblogs.com/dw729/p/3024338.html
Copyright © 2011-2022 走看看