<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 閱讀(1690) 評論(0)  編輯  收藏 所屬分類: jmeter

    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    導航

    統計

    常用鏈接

    留言簿(55)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产免费久久久久久无码| 亚洲精品无码成人片久久不卡| 亚洲精品黄色视频在线观看免费资源| 日韩激情无码免费毛片| 亚洲AV无码一区二区三区性色 | 国产福利免费视频| 亚洲日韩中文在线精品第一| 精品久久久久久久久亚洲偷窥女厕| 一二三四视频在线观看中文版免费| 亚洲中文无码a∨在线观看| 国产成人精品免费视频大全麻豆 | 美女黄网站人色视频免费| 国产免费怕怕免费视频观看| 黑人粗长大战亚洲女2021国产精品成人免费视频 | 国产免费不卡视频| 天天爽亚洲中文字幕| 成年女人男人免费视频播放| 亚洲国产成人久久精品软件| 凹凸精品视频分类国产品免费| 国产精品福利片免费看| 亚洲av中文无码乱人伦在线r▽ | 亚洲日本在线看片| 丁香花免费高清视频完整版| 国产精品亚洲av色欲三区| 久久精品国产亚洲一区二区三区| 精品一卡2卡三卡4卡免费视频| 亚洲第一页中文字幕| 免费A级毛片无码久久版| 99久久99这里只有免费的精品| 亚洲精选在线观看| 免费观看毛片视频| 免费黄网站在线看| 亚洲综合中文字幕无线码| 国产一级一片免费播放i| 中文字幕永久免费视频| 全免费一级午夜毛片| 高清免费久久午夜精品| 亚洲综合久久成人69| 日韩免费无码一区二区视频| 国产一级在线免费观看| 国产亚洲sss在线播放|