<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    qileilove

    blog已經轉移至github,大家請訪問 http://qaseven.github.io/

    jmeter之定時器

    18.6.6 BeanShell Timer

    The BeanShell Timer can be used to generate a delay.

    For full details on using BeanShell, please see the BeanShell website.

    The test element supports the ThreadListener and TestListener methods. These should be defined in the initialisation file. See the file BeanShellListeners.bshrc for example definitions.

    Control Panel

    Parameters

                
    AttributeDescriptionRequired
    NameDescriptive name for this element that is shown in the tree. The name is stored in the script variable LabelNo
    Reset bsh.Interpreter before each callIf this option is selected, then the interpreter will be recreated for each sample. This may be necessary for some long running scripts. For further information, see Best Practices - BeanShell scripting .Yes
    ParametersParameters to pass to the BeanShell script. The parameters are stored in the following variables:
    • Parameters - string containing the parameters as a single variable
    • bsh.args - String array containing parameters, split on white-space
    No
    Script fileA file containing the BeanShell script to run. The file name is stored in the script variable FileName The return value is used as the number of milliseconds to wait.No
    ScriptThe BeanShell script. The return value is used as the number of milliseconds to wait.Yes (unless script file is provided)

     

    Before invoking the script, some variables are set up in the BeanShell interpreter:

    • log - (Logger) - can be used to write to the log file
    • ctx - ( JMeterContext ) - gives access to the context
    • vars - ( JMeterVariables ) - gives read/write access to variables: vars.get(key); vars.put(key,val); vars.putObject("OBJ1",new Object());
    • props - (JMeterProperties - class java.util.Properties) - e.g. props.get("START.HMS"); props.put("PROP1","1234");
    • prev - ( SampleResult ) - gives access to the previous SampleResult (if any)

    For details of all the methods available on each of the above variables, please check the Javadoc

    If the property beanshell.timer.init is defined, this is used to load an initialisation file, which can be used to define methods etc for use in the BeanShell script.


    18.6.7 BSF Timer

    The BSF Timer can be used to generate a delay using a BSF scripting language.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this element that is shown in the tree.No
    ScriptLanguageThe scripting language to be used.Yes
    ParametersParameters to pass to the script. The parameters are stored in the following variables:
    • Parameters - string containing the parameters as a single variable
    • args - String array containing parameters, split on white-space
    No
    Script fileA file containing the script to run, if a relative file path is used, then it will be relative to directory referenced by "user.dir" System property The return value is converted to a long integer and used as the number of milliseconds to wait.No
    ScriptThe script. The return value is used as the number of milliseconds to wait.Yes (unless script file is provided)

     

    Before invoking the script, some variables are set up in the script interpreter:

    • log - (Logger) - can be used to write to the log file
    • ctx - ( JMeterContext ) - gives access to the context
    • vars - ( JMeterVariables ) - gives read/write access to variables: vars.get(key); vars.put(key,val); vars.putObject("OBJ1",new Object());
    • props - (JMeterProperties - class java.util.Properties) - e.g. props.get("START.HMS"); props.put("PROP1","1234");
    • sampler - the current Sampler
    • Label - the name of the Timer
    • Filename - the file name (if any)
    • OUT - System.out

    For details of all the methods available on each of the above variables, please check the Javadoc


    18.6.4 Constant Throughput Timer

    This timer introduces variable pauses, calculated to keep the total throughput (in terms of samples per minute) as close as possible to a give figure. Of course the throughput will be lower if the server is not capable of handling it, or if other timers or time-consuming test elements prevent it.

    N.B. although the Timer is called the Constant Throughput timer, the throughput value does not need to be constant. It can be defined in terms of a variable or function call, and the value can be changed during a test. The value can be changed in various ways:

    • using a counter variable
    • using a JavaScript or BeanShell function to provide a changing value
    • using the remote BeanShell server to change a JMeter property

    See Best Practices for further details. Note that the throughput value should not be changed too often during a test - it will take a while for the new value to take effect.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the tree.No
    Target ThroughputThroughput we want the timer to try to generate.Yes
    Calculate Throughput based on
    • this thread only - each thread will try to maintain the target throughput. The overall throughput will be proportional to the number of active threads.
    • all active threads in current thread group - the target throughput is divided amongst all the active threads in the group. Each thread will delay as needed, based on when it last ran.
    • all active threads - the target throughput is divided amongst all the active threads in all Thread Groups. Each thread will delay as needed, based on when it last ran. In this case, each other Thread Group will need a Constant Throughput timer with the same settings.
    • all active threads in current thread group (shared) - as above, but each thread is delayed based on when any thread in the group last ran.
    • all active threads (shared) - as above; each thread is delayed based on when any thread last ran.
    Yes

     



    18.6.9 Poisson Random Timer

    This timer pauses each thread request for a random amount of time, with most of the time intervals ocurring near a particular value. The total delay is the sum of the Poisson distributed value, and the offset value.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the treeNo
    LambdaLambda value in milliseconds.Yes
    Constant Delay OffsetNumber of milliseconds to pause in addition to the random delay.Yes

     



    ^

    18.6.5 Synchronizing Timer

    The purpose of the SyncTimer is to block threads until X number of threads have been blocked, and then they are all released at once. A SyncTimer can thus create large instant loads at various points of the test plan.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the tree.No
    Number of Simultaneous Users to Group byNumber of threads to release at once. Setting it to 0 is equivalent to setting it to Number of threads in Thread Group.Yes

     

    18.6.3 Uniform Random Timer

    This timer pauses each thread request for a random amount of time, with each time interval having the same probability of occurring. The total delay is the sum of the random value and the offset value.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the tree.No
    Random Delay MaximumMaxium random number of milliseconds to pause.Yes
    Constant Delay OffsetNumber of milliseconds to pause in addition to the random delay.Yes

    18.6.1 Constant Timer

    If you want to have each thread pause for the same amount of time between requests, use this timer.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the tree.No
    Thread DelayNumber of milliseconds to pause.Yes



    18.6.2 Gaussian Random Timer

    This timer pauses each thread request for a random amount of time, with most of the time intervals ocurring near a particular value. The total delay is the sum of the Gaussian distributed value (with mean 0.0 and standard deviation 1.0) times the deviation value you specify, and the offset value. Another way to explain it, in Gaussian Random Timer, the variation around constant offset has a gaussian curve distribution.

    Control Panel

    Parameters

    AttributeDescriptionRequired
    NameDescriptive name for this timer that is shown in the treeNo
    DeviationDeviation in milliseconds.Yes
    Constant Delay OffsetNumber of milliseconds to pause in addition to the random delay.Yes

    posted on 2014-03-03 11:55 順其自然EVO 閱讀(1694) 評論(0)  編輯  收藏 所屬分類: jmeter

    <2025年7月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    導航

    統計

    常用鏈接

    留言簿(55)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 四虎在线免费播放| 午夜性色一区二区三区免费不卡视频 | 久久乐国产精品亚洲综合| 亚洲精品美女久久久久久久| 性色av无码免费一区二区三区| 亚洲乱码一二三四区国产| 日本成年免费网站| 国产v亚洲v天堂a无| 性xxxx视频播放免费| 久久久久久亚洲精品无码| 国产男女猛烈无遮挡免费视频| jizzjizz亚洲日本少妇| 免费大学生国产在线观看p| 国产午夜亚洲精品不卡免下载| 亚洲精品无码成人片在线观看| 精精国产www视频在线观看免费| 亚洲一区爱区精品无码| 色欲色香天天天综合网站免费| 777亚洲精品乱码久久久久久 | 亚洲成a人片在线网站| 欧美最猛性xxxxx免费| 色偷偷尼玛图亚洲综合| 4338×亚洲全国最大色成网站| 久久久精品免费国产四虎| 亚洲一区二区成人| 成人五级毛片免费播放| 国产午夜无码精品免费看动漫| 破了亲妺妺的处免费视频国产 | 91免费福利精品国产| 亚洲中文字幕人成乱码| 破了亲妺妺的处免费视频国产| 国产99久久久国产精免费| 亚洲精品中文字幕无乱码| 成年18网站免费视频网站| 免费一级毛片在线播放视频免费观看永久 | 亚洲日韩AV一区二区三区中文| 少妇亚洲免费精品| 99久久国产免费中文无字幕| 亚洲小说图区综合在线| 久久精品国产亚洲5555| 毛片免费vip会员在线看|