使用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地 ...
随机推荐
- [转]HttpClient的超时用法小记
HttpClient的超时用法小记 HttpClient在使用中有两个超时时间,是一直接触和使用的,由于上次工作中使用httpClient造成了系统悲剧的情况,特地对它的两个超时时间进行了小小的测试, ...
- 李洪强iOS之Foundation框架—字符串
Foundation框架—字符串 一.Foundation框架中一些常用的类 字符串型: NSString:不可变字符串 NSMutableString:可变字符串 集合型: 1) NSArray:O ...
- 大陆 Google play 开发者注册(2016)
1:准备一个VPN, 如: https://vpnso.com 收费的,使用一两年了,还不错,很稳定2:准备一张普通的银行卡或者信用卡就可以了,能正常绑定支付宝就行3:在全球付上面申请一个 虚拟 ...
- GridView 和ListView中自适应高度
android中GridView 和ListView放在scrollView中时会默认的只有一行高这时就要我们自己计算出它的高度啦 首先是listview的 //动态设置listview的高度 pu ...
- Objective-c CoreData
#import "AppDelegate.h" #import "Person.h" @implementation AppDelegate @synthesi ...
- JodaTime初体验
前段时间用JDK自带的Calendar类来处理日期,需要获取年.季,月,星期的起始日期,被折腾得要死要活.看了这篇文章 http://www.blogbus.com/dreamhead-logs/22 ...
- hive学习笔记——表的基本的操作
1.hive的数据加载方式 1.1.load data 这中方式一般用于初始化的时候 load data [local] inpath '...' [overwrite] into table t1 ...
- Java关键字static、final使用小结
static 1. static变量 按照是否静态的对类成员变量进行分类可分两种:一种是被static修饰的变量,叫静态变量或类变量:另一种是没有被static修饰的变量,叫实例变量.两者的 ...
- bzoj4011
好题,首先有一个结论,有向无环图的树形图数目=根节点意外入度之积 现在相当于在原图上加一条边问树形图的数目 考虑多出来不合法的方案,一定是成环且包含新加入的边 对于一条路贡献就是∏d[i] [i∉pa ...
- bzoj3798: 特殊的质数
分块打表.块内的暴力块外的打表.开始没有j>0所以WA了. #include<cstdio> #include<cmath> #include<cstring> ...