<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)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 日韩毛片免费无码无毒视频观看| 免费在线观看a级毛片| 亚洲色偷偷偷综合网| 免费一级毛片在线播放| 另类免费视频一区二区在线观看| 亚洲午夜久久久精品电影院| 亚洲国产综合人成综合网站| 99re6免费视频| 无遮挡a级毛片免费看| 亚洲黄色片免费看| 亚洲av日韩av欧v在线天堂| 亚州免费一级毛片| 一级日本高清视频免费观看| 亚洲日本国产综合高清| 亚洲精品午夜无码电影网| 四虎影院免费在线播放| 99精品视频在线观看免费专区 | 亚洲人成无码网WWW| 亚洲高清视频免费| 国产乱妇高清无乱码免费| 国产精品亚洲片在线va| 亚洲Av综合色区无码专区桃色 | 免费a级毛片在线观看| 精品久久8x国产免费观看| 国产精品免费大片一区二区| 亚洲影院天堂中文av色| 久久精品九九亚洲精品| 久久久无码精品亚洲日韩软件| 免费无码精品黄AV电影| 亚洲国语精品自产拍在线观看| 免费又黄又爽又猛的毛片| 国产在线国偷精品产拍免费| 久久一区二区三区免费播放| 一级一级毛片免费播放| 久久亚洲精品高潮综合色a片| 亚洲伊人久久大香线蕉啊 | 麻豆va在线精品免费播放| 亚洲色图激情文学| 亚洲成人免费电影| 久久久久亚洲AV无码永不| 亚洲日产韩国一二三四区|