Skip to content

Commit e5d5588

Browse files
committed
fix stress-test: add pauses between requests
- period was linked to thread ramp-up, if we want delay between requests, we need to add a Timer (Constant Timer for example)
1 parent fe65758 commit e5d5588

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

other/jmeter/BBData-api-stress-test.jmx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<stringProp name="Argument.value">wr1</stringProp>
3434
<stringProp name="Argument.metadata">=</stringProp>
3535
</elementProp>
36+
<elementProp name="ramp_up" elementType="Argument">
37+
<stringProp name="Argument.name">ramp_up</stringProp>
38+
<stringProp name="Argument.value">0.1</stringProp>
39+
<stringProp name="Argument.metadata">=</stringProp>
40+
</elementProp>
3641
<elementProp name="threads_input" elementType="Argument">
3742
<stringProp name="Argument.name">threads_input</stringProp>
3843
<stringProp name="Argument.value">4</stringProp>
@@ -55,7 +60,7 @@
5560
</elementProp>
5661
<elementProp name="period" elementType="Argument">
5762
<stringProp name="Argument.name">period</stringProp>
58-
<stringProp name="Argument.value">0.1</stringProp>
63+
<stringProp name="Argument.value">100</stringProp>
5964
<stringProp name="Argument.metadata">=</stringProp>
6065
</elementProp>
6166
<elementProp name="id_inc" elementType="Argument">
@@ -173,7 +178,7 @@ prev.setIgnore()</stringProp>
173178
<intProp name="LoopController.loops">-1</intProp>
174179
</elementProp>
175180
<stringProp name="ThreadGroup.num_threads">${__P(@threads_input)}</stringProp>
176-
<stringProp name="ThreadGroup.ramp_time">${__P(@period)}</stringProp>
181+
<stringProp name="ThreadGroup.ramp_time">${__P(@ramp_up)}</stringProp>
177182
<boolProp name="ThreadGroup.scheduler">true</boolProp>
178183
<stringProp name="ThreadGroup.duration">${__P(@duration)}</stringProp>
179184
<stringProp name="ThreadGroup.delay"></stringProp>
@@ -249,6 +254,10 @@ vars.put(&quot;bsh_done&quot;, &quot;1&quot;);
249254
<stringProp name="TestPlan.comments">object_id and token are generated in beanshell script (derived from threadNum), value is set in properties</stringProp>
250255
</HTTPSamplerProxy>
251256
<hashTree/>
257+
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
258+
<stringProp name="ConstantTimer.delay">${__P(@period)}</stringProp>
259+
</ConstantTimer>
260+
<hashTree/>
252261
</hashTree>
253262
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group: info" enabled="true">
254263
<stringProp name="ThreadGroup.on_sample_error">stoptestnow</stringProp>
@@ -257,7 +266,7 @@ vars.put(&quot;bsh_done&quot;, &quot;1&quot;);
257266
<intProp name="LoopController.loops">-1</intProp>
258267
</elementProp>
259268
<stringProp name="ThreadGroup.num_threads">${__P(@threads_info)}</stringProp>
260-
<stringProp name="ThreadGroup.ramp_time">${__P(@period)}</stringProp>
269+
<stringProp name="ThreadGroup.ramp_time">${__P(@ramp_up)}</stringProp>
261270
<boolProp name="ThreadGroup.scheduler">true</boolProp>
262271
<stringProp name="ThreadGroup.duration">${__P(@duration)}</stringProp>
263272
<stringProp name="ThreadGroup.delay"></stringProp>
@@ -283,6 +292,10 @@ vars.put(&quot;bsh_done&quot;, &quot;1&quot;);
283292
<stringProp name="HTTPSampler.response_timeout"></stringProp>
284293
</HTTPSamplerProxy>
285294
<hashTree/>
295+
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
296+
<stringProp name="ConstantTimer.delay">${__P(@period)}</stringProp>
297+
</ConstantTimer>
298+
<hashTree/>
286299
</hashTree>
287300
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group: get latest" enabled="true">
288301
<stringProp name="ThreadGroup.on_sample_error">stoptestnow</stringProp>
@@ -291,7 +304,7 @@ vars.put(&quot;bsh_done&quot;, &quot;1&quot;);
291304
<intProp name="LoopController.loops">-1</intProp>
292305
</elementProp>
293306
<stringProp name="ThreadGroup.num_threads">${__P(@threads_get_latest)}</stringProp>
294-
<stringProp name="ThreadGroup.ramp_time">${__P(@period)}</stringProp>
307+
<stringProp name="ThreadGroup.ramp_time">${__P(@ramp_up)}</stringProp>
295308
<boolProp name="ThreadGroup.scheduler">true</boolProp>
296309
<stringProp name="ThreadGroup.duration">${__P(@duration)}</stringProp>
297310
<stringProp name="ThreadGroup.delay"></stringProp>
@@ -350,6 +363,10 @@ vars.put(&quot;bsh_done&quot;, &quot;1&quot;);</stringProp>
350363
</HeaderManager>
351364
<hashTree/>
352365
</hashTree>
366+
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
367+
<stringProp name="ConstantTimer.delay">${__P(@period)}</stringProp>
368+
</ConstantTimer>
369+
<hashTree/>
353370
</hashTree>
354371
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree: errors only" enabled="true">
355372
<boolProp name="ResultCollector.error_logging">true</boolProp>

0 commit comments

Comments
 (0)