博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
学习siege实战
阅读量:5291 次
发布时间:2019-06-14

本文共 3058 字,大约阅读时间需要 10 分钟。

siege实战步骤:

  1. 安装rz、sz,下载SecureCRT工具进行阿里云服务器的ssh连接
  2. 完成siege实战

需求1: 使用siege对多个页面进行加压

(并发数5,持续运行1分钟)

Transactions:                   1048 hitsAvailability:                  95.45 %Elapsed time:                  59.51 secsData transferred:             154.33 MBResponse time:                  0.22 secsTransaction rate:              17.61 trans/secThroughput:                     2.59 MB/secConcurrency:                    3.93Successful transactions:         896Failed transactions:              50Longest transaction:            2.39Shortest transaction:           0.07

需求2: 保存siege日志

Transactions:                   1113 hitsAvailability:                  95.05 %Elapsed time:                  59.87 secsData transferred:             167.95 MBResponse time:                  0.21 secsTransaction rate:              18.59 trans/secThroughput:                     2.81 MB/secConcurrency:                    3.96Successful transactions:         950Failed transactions:              58Longest transaction:            0.60Shortest transaction:           0.07LOG FILE: result.csvYou can disable this log file notification by editing/root/.siege/siege.conf and changing 'show-logfile' to false.root@iZ2ze0ht45qn4m8m1wjfdrZ:~# sz result.csvrzStarting zmodem transfer.  Press Ctrl+C to cancel.Transferring result.csv...  100%     365 bytes  365 bytes/sec 00:00:01       0 Errors

result.csv日志内容:

需求3: 压测时启用gzip压缩

Transactions:                    820 hitsAvailability:                 100.00 %Elapsed time:                  59.57 secsData transferred:               4.56 MBResponse time:                  0.36 secsTransaction rate:              13.77 trans/secThroughput:                     0.08 MB/secConcurrency:                    4.98Successful transactions:         820Failed transactions:               0Longest transaction:            0.54Shortest transaction:           0.33 LOG FILE: result_gip.csv

result_gip.csv日志内容:

需求4: 对移动站点进行压测

  • 1.桌面版本百度首页请求
Transactions:                      6 hitsAvailability:                  85.71 %Elapsed time:                   0.73 secsData transferred:               0.21 MBResponse time:                  0.11 secsTransaction rate:               8.22 trans/secThroughput:                     0.28 MB/secConcurrency:                    0.93Successful transactions:           6Failed transactions:               1Longest transaction:            0.19Shortest transaction:           0.08
  • 2.移动版百度首页请求(模拟iphone6试一下,user-agent:Apple-iPhone7C2/1202.466)
    siege -c1 -r1 -A"Apple-iPhone7C2/1202.466" http://www.baidu.com
Transactions:                      2 hitsAvailability:                 100.00 %Elapsed time:                   0.17 secsData transferred:               0.01 MBResponse time:                  0.09 secsTransaction rate:              11.76 trans/secThroughput:                     0.03 MB/secConcurrency:                    1.00Successful transactions:           2Failed transactions:               0Longest transaction:            0.09Shortest transaction:           0.08

转载于:https://www.cnblogs.com/sandysun/p/8759483.html

你可能感兴趣的文章
asp.net FileUpload控件文件格式的判断及文件大小限制
查看>>
angular(1.5.8)
查看>>
h5的video标签支持的视频格式
查看>>
TCP/IP详解学习笔记(3)IP协议ARP协议和RARP协议
查看>>
简单【用户输入验证】
查看>>
学android:直接用jdk来helloworld
查看>>
Access Jira RESTful API by cURL
查看>>
python tkinter GUI绘制,以及点击更新显示图片
查看>>
Spark基础脚本入门实践3:Pair RDD开发
查看>>
HDU4405--Aeroplane chess(概率dp)
查看>>
RIA Test:try catch 对 Error #1009 (无法访问空对象引用的属性或方法)的处理
查看>>
python使用easyinstall安装xlrd、xlwt、pandas等功能模块的方法
查看>>
CS0103: The name ‘Scripts’ does not exist in the current context解决方法
查看>>
20130330java基础学习笔记-语句_for循环嵌套练习2
查看>>
Spring面试题
查看>>
窥视SP2010--第一章节--SP2010开发者路线图
查看>>
MVC,MVP 和 MVVM 的图示,区别
查看>>
C语言栈的实现
查看>>
代码为什么需要重构
查看>>
TC SRM 593 DIV1 250
查看>>