使用IP欺骗Loadrunner并发测试小结


Action()
{ int status;
int HttpRetCode;
char *ip;
ip = lr_get_vuser_ip();
//检查Loadrunner Controller有没有Enable IP Spoofing
if(ip)
lr_output_message("The IP address is %s", ip);
else
lr_output_message("IP spoofing disabled");
//设置集合点,让50个vuser一起发起第一个请求
lr_rendezvous("letusgo");
//开始第一个事务(请求)
lr_start_transaction("1stReq"); web_url("RCS_Initial_HTTP_Req",
//这里有一个参数化,我要每一次传递给该参数一个唯一的msisdn号码,并且只执行一次。
//我在参数属性对话框里设置:Select next row -> Unique
// Update value on -> Once
"URL= http://xxx.yyy.com/self?x-forwarding-msisdn={NewParam}",
"TargetFrame=Main",
"Resource=0",
"RecContentType=text/html",
"Mode=http",
LAST );
//打印第一个请求的返回码
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
lr_output_message("Response code:%d",HttpRetCode);
//检查返回码是否是200
if(HttpRetCode == ){
lr_end_transaction("1stReq", LR_PASS);
sleep();
//开始第二个事务(请求)
lr_start_transaction("2ndReq");
web_url("RCS_Initial_HTTP_Req",
"URL= https://xxx.yyy.com/self?vers=1&IMSI=1&rcs_version=1&rcs_profile=1&client_vendor=1&client_version=1&terminal_vendor=1&terminal_model=1&terminal_sw_version=1&IMEI=1&mock_scheme=HTTPS",
"TargetFrame=Main",
"Resource=0",
"RecContentType=text/html",
"Mode=http",
LAST );
//打印第二个请求的返回码
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
lr_output_message("Response code:%d",HttpRetCode);
//检查返回码是否是200
//结束第二个事务(请求)
if(HttpRetCode == ){
lr_end_transaction("2ndReq", LR_PASS);
}else{
lr_end_transaction("2ndReq", LR_FAIL);
} return ; }else{
//结束第一个事务(请求)
lr_end_transaction("1stReq", LR_FAIL);
return ;
}
}
场景设置:




一定要注意每一个Vuser的IP是否是唯一的。双击下图Scenario Groups里面的Group Name行可以打开每一个Vuser对应的Generator,查看其IP。


[root@~]# service rstatd status
rpc.rstatd (pid 2650) is running...
[root@~]#


| UNIX counter | Windows Counter | Description |
| Average Load* | N/A | The sum of the number of processes waiting in the run queue plus the number currently executing. |
| Collision rate | N/A | The total number of network collisions/sec |
| Context switch rate | System – Context Switches/sec | The rate at which processors switch from executing one thread to another. High switch rates can indicate performance problems as servers juggle multiple running applications. |
| CPU utilisation | %Processor Time | The percentage of elapsed time that the process spends executing non-idle threads. |
| Disk traffic | %Disk time | The percentage of elapsed time that the disk(s) are busy servicing read or write requests. |
| Incoming packets error rate | Packets received errors | The number of packets received containing errors that precvent them from being delivered to a higher OSI layer protocol. |
| Incoming packets rate | Packets received/sec | The number of packets received on the network interface |
| Interrupt rate | Interrupts/sec | Average rate at which the processor receives and services hardware interrupts. Processes generate an interrupt when they finish a task and need to report that fact to the CPU. |
| Outgoing packets error rate | Packets outbound errors | The number of packets that can’t be transmitted due to errors |
| Outgoing packets rate | Packets sent / sec | The rate at which packets are sent on the network interface |
| Page-in rate | Pages Input/sec | The rate at which pages are read from disk to resolve hard page faults. Hard page faults occur when a process refers to a page in virtual memory which is not in it’s working set or available elsewhere in physical memory and has to be read from disk. |
| Page-out rate | Pages Output/sec | The rate at which memory pages are written to disk to free up space in physical memory. |
| Paging rate | Paging rate | The rate at which pages are read from disk or written to disk. This is the sum of Pages Input/sec and Pages Output/sec. |
| Swap-in rate | N/A | The number of pages read into memory per second |
| Swap-out rate | N/A | The number of pages written out of memory per second |
| System mode CPU utilization | Processor – %Priviledged time | The percentage of elapsed time that the processor spends executing user threads (i.e. running applications) |
| User mode CPU utilization | Processor – %User time | The percentage or elapsed time that the processor spends executing priviledged or system mode threads. |
使用IP欺骗Loadrunner并发测试小结的更多相关文章
- jmeter使用IP欺骗进行压力测试
loadrunner的IP欺骗功能很强大,耐心研究jmeter官方文档,发现在jmeter2.5以上的版本有此功能的实现~ 准备工作: 1.window7一台,安装jdk1.6环境. 2.下载最新 ...
- 转 LoadRunner 技巧之 IP欺骗 (推荐)
IP欺骗也是也loadrunner自带的一个非常有用的功能. 需要使用ip欺骗的原因: 1.当某个IP的访问过于频繁,或者访问量过大是,服务器会拒绝访问请求,这时候通过IP欺骗可以增加访问频率和访问量 ...
- LoadRunner 技巧之 IP欺骗 (推荐)
IP欺骗也是也loadrunner自带的一个非常有用的功能. 需要使用ip欺骗的原因:1.当某个IP的访问过于频繁,或者访问量过大是,服务器会拒绝访问请求,这时候通过IP欺骗可以增加访问频率和访问量, ...
- LoadRunner 技巧之 IP欺骗
IP欺骗也是也loadrunner自带的一个非常有用的功能. 需要使用ip欺骗的原因:1.当某个IP的访问过于频繁,或者访问量过大是,服务器会拒绝访问请求,这时候通过IP欺骗可以增加访问频率和访问量, ...
- jmeter使用IP欺骗压力测试
最近在使用jmeter进行压力测试时需要使用类似于loadrunner的IP欺骗功能,经问津度娘无果后决定再次耐心研究jmeter官方文 档,终于发现在jmeter2.5以上的版本有此功能的实现,由于 ...
- 转 jmeter使用IP欺骗压力测试
jmeterIP 欺骗多IP 最近在使用jmeter进行压力测试时需要使用类似于loadrunner的IP欺骗功能,经问津度娘无果后决定再次耐心研究jmeter官方文 档,终于发现在jmeter2.5 ...
- 【Loadrunner】初学Loadrunner——IP欺骗
因为在默认情况下,同一个用户用同一个IP访问运行是不符合实际情况的,而且很多网站会自动屏蔽同个IP多次重复访问.那么就想到了Loadrunner的虚拟IP技术,也就是常说的IP欺骗.在用Loadrun ...
- LoadRunner学习知多少--IP欺骗使用
使用IP欺骗功能时,需要将系统防火墙,杀毒软件关闭(如果有影响的话) 一.为什么要设置IP欺骗 1. 当某个IP的访问过于频繁,或者访问量过大时,服务器会拒绝访问请求,这时候通过IP欺骗可以增加访问频 ...
- Loadrunner如何进行有效的IP欺骗
柠檬班的清风同学某天紧急求助如何搞IP欺骗,端午节后,抽时间把这个事情搞定啦!跟大家详细的讲讲IP欺骗的运用和理解. 一.什么是IP欺骗 给你客户端的IP地址加个马甲,让服务器端识别不到是同一个IP地 ...
随机推荐
- asp.net中runat="server"的含义
aspx运行时会被编译,其中没有runat server属性的html标签会被直接写入response,有runat server属性的html标签会转换成对应的HtmlControl子类加入 到页面 ...
- 理解maven
1.理解“仓库” 首次运行完mvn -version后,会在用户目录下创建一个.m2的目录(比如:C:\Users\当前用户名\.m2\),这个目录是maven的“本地仓库”,仓库是maven中一个很 ...
- Linux资源监控命令/工具(综合)
目录: ps pstree pidof top free uptime ifuser lsof mpstat vmstst pidstat iostat iotop watch sar 1.ps 1) ...
- Hibernate逍遥游记-第13章 映射实体关联关系-003单向多对多
0. 1. drop database if exists SAMPLEDB; create database SAMPLEDB; use SAMPLEDB; create table MONKEYS ...
- 卷积神经网络Convolutional Neural Networks
Convolutional Neural Networks NOTE: This tutorial is intended for advanced users of TensorFlow and a ...
- 浅谈PHP自动化代码审计技术
原文出处: exploit 欢迎分享原创到伯乐头条 0×00 由于博客实在没什么可以更新的了,我就把目前做的事情总结一下,当做一篇博客,主要是谈一谈项目中所运用的一些技术.目前市面上有不少PHP的 ...
- proc_dir_entry
struct proc_dir_entry { unsigned int low_ino; unsigned short namelen; const cha ...
- [POJ3352]Road Construction(缩点,割边,桥,环)
题目链接:http://poj.org/problem?id=3352 给一个图,问加多少条边可以干掉所有的桥. 先找环,然后缩点.标记对应环的度,接着找桥.写几个例子就能知道要添加的边数是桥的个数/ ...
- Oracle数据泵导入导出数据,建立表空
Oracle11g 数据导入到oracle10g 中:1.在oracle11g 服务器命令行中用expdp 导出数据expdp ts/ts@orcl directory=expdp_dir dumpf ...
- pfx 转 snk
最近用 fody 加在c#工程内,但是签名只认snk ,好像是mono cecil的问题,都不认pfx,重新生成snk文件,publishkey又要变了, 底层dll引用的地方太多,要改好多cspro ...