使用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地 ...
随机推荐
- hdu1068 Girls and Boys
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1068 二分图的最大独立集数=节点数(n)— 最大匹配数(m) 另外需要注意的是: 本题求出的最大匹配数是实 ...
- 为Android Studio 项目手动下载gradle
在http://developer.android.com/samples/index.html上下载的例子,导入Android Studio的时候,第一件事就是下载项目对应版本的gradle.gra ...
- @JsonFormat时间不对
实际时间为:2015-07-06 20:20:23 1. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date ...
- 欧拉工程第67题:Maximum path sum II
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the ma ...
- python 下划线的使用(转载:安生犹梦 新浪博客)
Python 用下划线作为变量前缀和后缀指定特殊变量. _xxx 不能用'from module import *'导入 __xxx__ 系统定义名字 __xxx 类中的私有变量名 核 ...
- linux 显示当前用户信息
1.w命令 2.who命令 3.who am i 4. users
- C++:构造函数的重载
构造函数的重载的判断条件是:参数的个数或者类型不同,其他要保持一样 举例说明: 方式一:在类中声明重载构造函数,在类外定义 //第一种方法: #include<iostream> usin ...
- WCF 简单示例
WCF(Windows Communication Foundation,WCF)是基于Windows平台下开发和部署服务的软件开发包(Software Development Kit,SDK).WC ...
- Maven中心仓库
当你使用Maven构建一个项目,Maven会检查你的pom.xml文件,找出需要下载的依赖包.首先它会到本地仓库查找所需的文件,如果没找到,就到默认的中心仓库(这是新的http://search.ma ...
- nginx的location配置
http://blog.sina.com.cn/s/blog_97688f8e0100zws5.html http://blog.csdn.net/yanook/article/details/100 ...