Skip to content

Commit 0cd35b5

Browse files
Improve documentation by removing some unnecessary text and fixing some typos
1 parent b98dc3a commit 0cd35b5

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

docs/guide/request-generation/timers/constant-and-random.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test;
1313
public class PerformanceTest {
1414

1515
@Test
16-
public void testTransactions() throws IOException {
16+
public void test() throws IOException {
1717
testPlan(
1818
threadGroup(2, 10,
1919
httpSampler("http://my.service/items"),

docs/guide/request-generation/timers/throughput-timer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class PerformanceTest {
1616

1717
@Test
1818
public void testPerformance() throws Exception {
19-
TestPlanStats stats = testPlan(
19+
testPlan(
2020
threadGroup(10, Duration.ofSeconds(10),
2121
throughputTimer(120),
2222
httpSampler("http://my.service")

jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/JmeterDsl.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ public static DslFlowControlAction threadPause(Duration duration) {
16721672
}
16731673

16741674
/**
1675-
* Sames as {@link #threadPause(Duration)} but allowing to use JMeter expressions for the
1675+
* Same as {@link #threadPause(Duration)} but allowing to use JMeter expressions for the
16761676
* duration.
16771677
* <p>
16781678
* For example, you can set a delay depending on the amount of time taken in last sample with
@@ -1699,7 +1699,7 @@ public static DslConstantTimer constantTimer(Duration duration) {
16991699
}
17001700

17011701
/**
1702-
* Sames as {@link #constantTimer(Duration)} but allowing tu use a JMeter expression.
1702+
* Same as {@link #constantTimer(Duration)} but allowing tu use a JMeter expression.
17031703
* <p>
17041704
* For example, you can set a delay depending on the amount of time taken in last sample with
17051705
* something like <pre>{@code ${__groovy(5000 - prev.time)}}</pre>.
@@ -1716,19 +1716,15 @@ public static DslConstantTimer constantTimer(String duration) {
17161716
/**
17171717
* Builds a Uniform Random Timer which pauses the thread with a random time with uniform
17181718
* distribution.
1719-
*
17201719
* <p>
17211720
* The timer uses the minimum and maximum durations to define the range of values to be used in
17221721
* the uniformly distributed selected value. These values differ from the parameters used in
17231722
* JMeter Uniform Random Timer element to make it simpler for general users to use. The generated
17241723
* JMeter test element uses as "constant delay offset" the minimum value, and as "maximum random
17251724
* delay" (maximum - minimum) value.
1726-
* </p>
1727-
*
17281725
* <p>
17291726
* EXAMPLE: wait at least 3 seconds and maximum of 10 seconds
17301727
* {@code uniformRandomTimer(Duration.ofSeconds(3), Duration.ofSeconds(10))}
1731-
* <p>
17321728
*
17331729
* @param minimum is used to set the constant delay of the Uniform Random Timer.
17341730
* @param maximum is used to set the maximum time the timer will be paused and will be used to

jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/timers/DslThroughputTimer.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929
* just influence samplers in that Thread Group, or as a child of a sampler to only control that
3030
* sampler.
3131
* <p>
32-
* When located at test plan level, this timer will use by default JMeter Constant Throughput Timer
33-
* All active threads with non-sharing calculation mode. Which means that it will control that the
34-
* total throughput for all requests in the test plan, across different thread groups, is at maximum
35-
* the given one. If you locate inside a thread group (or sampler), it will use All active threads
36-
* in current thread group with non-sharing mode. Avoiding potential problem of having two timers in
37-
* separate thread group interfering with each other. Additionally, default calculation modes don't
38-
* use shared modes since we have detected unexpected behaviors when using multiple timers.
39-
* Basically, timers delays calculations interfering with each other due to single test plan or
40-
* thread group mark used in calculation (instead of one per timer).
32+
* When located at test plan level, this timer will use by default the
33+
* {@link ThroughputMode#ALL_THREADS_EVEN} calculation mode. If you locate it inside a thread group
34+
* (or sampler), it will use {@link ThroughputMode#THREAD_GROUP_EVEN} calculation mode, avoiding
35+
* potential problem of having two timers in separate thread group interfering with each other.
36+
* Additionally, default calculation modes don't use shared modes since we have detected unexpected
37+
* behaviors when using multiple timers. Basically, timers delays calculations interfering with each
38+
* other due to single test plan or thread group mark used in calculation (instead of one per
39+
* timer).
4140
* <p>
4241
* If you want to change the default calculation method, then you can use
43-
* {@link #calculation(ThroughputMode)} method. But in general avoid using it since may lead to
42+
* {@link #calculation(ThroughputMode)} method. But in general, avoid using it, since may lead to
4443
* unexpected behaviors.
4544
*
4645
* @since 1.5

0 commit comments

Comments
 (0)