`
angelguo
  • 浏览: 119973 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

详细理解TPS

阅读更多

Loadrunner: Understanding Transaction Per Second (TPS)

Transaction per second (TPS) is the number of transactions executed per second. In other words, it can be calculated based on how many transactions are executed over certain duration of the test and then calculate it for a second.

For example, if a vuser executes 6 transactions every minute, then the TPS would be 6 transactions/60 sec = 0.10 TPS

There’s an important fact hidden in the above example. It also tells us that if the vuser is able to complete 6 transactions in 60 seconds that means response time for each transaction is 10 sec. i.e.

0.10 transactions –> 1 second

1 transaction –> 10 seconds

Little’s law

Before going into details of formula derived by little’s law, it is important to understand how response time and pacing are related because these are the key factors that control your TPS if the number of vusers are kept constant.

As we know pacing is inter-iteration gap i.e. it is the pause a vuser takes before executing next iteration. And hence it also helps to control the rate of iterations i.e. rate of transactions i.e. TPS.

Remember, Pacing always overrides Response time when it comes to determining TPS

In the examples below, let’s assume that the vuser’s action() contains only one transaction. In following examples, you may find that the terms ‘transaction’ and ‘iteration’ are used interchangeably. That is just because the action contains only one transaction. Thus one transaction will be fired when one iteration of the action is completed.

Example1:  Let’s say that we have set Pacing to zero and Think Time to zero.

A vuser performs 5 transactions and response time for each transaction is 10 seconds. Then it will take 5*10 = 50 seconds to complete 5 transactions. i.e. 5/50 = 0.1 TPS.Here, you can see that TPS is controlled by response time.

Example 1

Example2:  Let’s say that we have set pacing to 15 sec and Think Time to zero.

A vuser performs 5 transactions and response time for each transaction is 10 seconds. But the fact that now pacing is greater than response times, it will override the response times and it will control the transaction rate.  Thence it will take 5*15 = 75 seconds to complete 5 iterations.  i.e. 5/75 = 0.06667 TPS [This is the most correct way of setting up your test scenario to simulate consistent TPS load on the system under test.]

Example 2

In the second example, as long as the average response times are less than 15 seconds, it will always take 75 seconds to complete 5 iterations i.e. generate 0.06667 TPS

In both the above examples, we also assumed that think time was set to Zero. If, say, it was 2 seconds, total time taken to complete 5 transactions would still be 5*15 = 75 seconds i.e. generate (5/75) = 0.06667 TPS

Response time plus Think time

Once you understand this concept, rest understanding of Little’s law is easy.

If pacing is set to zero, then

Number of vusers = TPS * (Response Time + Think Time)

If pacing is ≠ zero and pacing > (response time + Think Time) , then the above formula would look like this

Number of vusers = TPS * (Pacing)

The fact that TPS is a rate of transactions w.r.t. time, it is also called as throughput.

So Little’s law is

Average number of users in the system = average response time * throughput

N  =  ( R + Z )  *  X

Where, N = Number of users

R = average response time (now you know, it can be pacing too)

Z = Think Time

X = Throughput (i.e. TPS)

Example, If N = 100, R = 2 sec, 100= (2+Z)*X and hence –> If Z=18, X = 5

NOTE: Please do let me know if you see any flaws in the above theory.

[Update on 30-03-2014]:  Many readers asked me a question about why I am confusing transactions with iterations in all the examples given in this post. Well, as stated somewhere in the explanation, I have made an assumption that the vuser’s Action() contains only one transaction in it. This may help beginners to understand the concept. So the code in script will look like

vuser_action()
{
  lr_start_transaction("LR_01_ViewFullPost");
  web_submit_data("ViewPost.aspx", 
    "Action=http://www.performancengineer.com/ViewPost.aspx?SID={sSID}", 
    "Method=POST", 
    "RecContentType=text/html", 
    "Referer=http://www.performancengineer.com/ViewPost.aspx?SID={sSID}",
    "Snapshot=t1.inf", 
    "Mode=HTTP",  
    ITEMDATA, 
    "Name=SID", "Value={aSID}", ENDITEM, 
    "Name=__VIEWSTATE", "Value={Viewstate_1}", ENDITEM, 
    "Name=ctl00$DefaultContent$txtDescription", "Value=ok", ENDITEM, 
    "Name=ctl00$DefaultContent$txtAmount", "Value=1", ENDITEM, 
    "Name=ctl00$DefaultContent$btnViewPostNow", "Value=Submit", ENDITEM, 
    "Name=__EVENTVALIDATION", "Value={Eventvalidation_1}", ENDITEM,  
    LAST);
  lr_end_transaction("LR_01_ViewFullPost", LR_AUTO);
  lr_think_time(lr_eval_string({pThinkTime}));
}
分享到:
评论

相关推荐

    tps-1_设计指南_TPS-1PROFINET_硬件设计流程_中文版_TPS-1

    首先,我们要理解TPS-1的核心——PROFINET技术。PROFINET是基于工业以太网的一种开放式通信标准,专为工厂自动化设计,提供实时数据传输和分布式自动化功能。它的优势在于高速、可靠和灵活,能够支持多种设备和协议...

    7941943TPS-RPM.zip_TPS matlab_TPS RPM_plate_rpm_tps

    标题中的“7941943TPS-RPM.zip”是一个压缩文件,其中包含了与“TPS(Thin Plate Splines)”和“RPM(Rigid Body Registration Method)”相关的MATLAB代码或数据。TPS是一种在几何形状匹配中广泛应用的插值方法,...

    TPS61088及其封装QVFN20_tps61088封装pcb_everenm_tps61088封装图_tps61088封装库

    这些源代码可以帮助用户更好地理解和控制TPS61088的工作方式。 综上所述,这个资源包提供了一整套关于TPS61088升压转换器的设计、实施和优化所需的信息,对任何需要用到此芯片的电子设计工程师来说都是宝贵的参考...

    一个TPS的matlab程序

    学习和理解TPS的Matlab程序,不仅可以深化对TPS算法的理解,还能提升在Matlab中的编程技巧,特别是处理几何变换和数据拟合问题的能力。同时,这也为其他类似的问题,如图像配准、三维重建等提供了一种强大的工具。...

    Renesas(瑞萨电子) TPS-1解决方案电路板启动手册.pdf

    瑞萨电子TPS-1解决方案电路板启动手册的这些内容为用户提供了全面的操作指导,帮助他们理解如何使用TPS-1电路板以及如何为其配置相应的硬件和软件环境。手册所涉及的知识点覆盖了硬件配置、软件安装、通信协议设置等...

    tpsWarp_TPS插值_

    通过阅读提供的原始文献,可以深入理解TPS的理论基础;通过运行MATLAB代码,可以直观地感受TPS插值的效果,并根据实际需求进行调整和优化。对于从事相关研究和应用的人员来说,这是一个非常有价值的资源。

    基于TPS5430的可调双电源设计 附原理图PCB文件

    这些资料提供了TPS5430的详细技术参数、推荐的电路配置以及设计注意事项,帮助工程师更好地理解和应用这款芯片。 综上所述,基于TPS5430的可调双电源设计是一项技术含量较高的工作,涉及到电源转换、电压调节、电路...

    TPS54160正负电压电源板.zip

    首先,让我们详细了解一下TPS54160芯片。这是一款电流模式PWM(脉宽调制)控制器,其设计目标是提供高效、紧凑的电源解决方案。它能够处理较大的输入电压范围,通常可以从几伏到几十伏,同时能够输出稳定的正负电压...

    018电子设计竞赛TI公司TPS63020详细资料

    TPS63020的原理图详细展示了各个组件的连接方式和工作原理,有助于开发者理解和设计。资料中还可能包括数据手册、应用笔记、设计指南等,这些资源提供了详细的电气参数、推荐元器件选择和布局建议。 六、实际应用中...

    基于TPS54202的DCDC电源模块设计

    【标题】"基于TPS54202的DCDC电源模块设计" 是一项重要的电子工程实践,它涉及到高效、稳定、可靠的电源转换技术。...理解并掌握这些知识点,才能设计出高性能、高可靠性的电源模块,以满足现代电子系统的需求。

    TPS54160开关电源原理图及PCB

    文件名“TPS54160A”可能是该器件的详细数据手册或一个示例设计文件,其中包含了更具体的参数、推荐的元器件值以及实际的PCB布局示意图。通过分析这个文件,设计师可以更深入地理解如何在实际项目中应用TPS54160。 ...

    TPS63020电赛资料

    下面将详细阐述TPS63020的主要特性、应用场合以及如何使用它。 1. **主要特性**: - **高效能**:TPS63020采用同步降压-升压拓扑结构,能够在宽输入电压范围内保持高转换效率,无论是电池供电还是交流适配器供电。...

    jmeter可视化曲线插件,tps等,所有的曲线图都有

    首先,我们要理解TPS的含义。TPS是衡量系统性能的重要指标,它表示系统在单位时间内处理事务的数量。在Web应用测试中,高TPS通常意味着更好的系统响应速度和更高的用户并发能力。通过JMeter的曲线插件,我们可以实时...

    瑞萨Renesas TPS-1 PROFINET IO Devices

    用户手册详细介绍了TPS-1设备的硬件结构和配置,包括处理器、内存、接口以及电源管理等。这些内容对于开发者理解和使用TPS-1至关重要,因为它们直接决定了设备的性能和兼容性。用户手册可能涵盖了设备的物理尺寸、...

    TPS

    下图展示了TPS65217与AM335x处理器之间的连接示意图,通过该示意图可以更直观地理解各个部分的功能及连接方式。 [此处省略了原文中的图表] 在典型应用中,TPS65217通过多个DC/DC转换器为AM335x处理器的不同部分...

    TPS92662Q1_Datasheet.zip_TI_TPS92662_Texas_matrix driver

    《TI TPS92662:高效能矩阵驱动器详解》 TI(德州仪器)的TPS92662是一款专为矩阵驱动应用设计的高性能集成电路,它在LED照明系统、...通过深入理解和充分利用其功能,可以提升整个系统的表现,并降低设计的复杂度。

    TPS23861原理图参考设计源文件DSN

    TPS23861是一款高性能的电源管理集成电路,主要用于为高速数据通信接口提供精确的电压调节和电流...通过深入理解和使用这份设计,工程师能够更好地掌握TPS23861的特性和应用,提高其在实际项目中的设计效率和成功率。

    TPS76系列稳压芯片中文资料

    通过深入学习这些中文资料,工程师可以更好地理解和利用TPS76系列稳压芯片,优化他们的电源管理设计,提高产品的可靠性和能效。这些资料对于电子工程师、学生以及对电源管理感兴趣的任何人都极具价值,不仅提供了...

    TPS65930 wince驱动

    4. **键盘驱动**(TPS659XX_KEYPAD):解析来自TPS65930的键盘扫描码,将它们转换为WinCE可以理解的按键事件。 5. **LED驱动**(TPS659xx_LED):控制TPS65930上的LED灯,实现亮度调节和状态指示。 6. **MADC驱动*...

    无线充电稳压模块TPS63020模块(包含原理图及PCB)

    TPS63020的PCB文件包含了详细的布局和布线策略,旨在最大化空间利用,降低干扰,并保证电路的热效率。设计者可以通过分析PCB文件,理解如何优化元件布局,以实现最佳的电磁兼容性和电源效率。 在实际应用中,TPS...

Global site tag (gtag.js) - Google Analytics