Skip to content

Commit

Permalink
Improve documentation by removing some unnecessary text and fixing so…
Browse files Browse the repository at this point in the history
…me typos
  • Loading branch information
rabelenda-abstracta committed May 3, 2024
1 parent b98dc3a commit 0cd35b5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test;
public class PerformanceTest {

@Test
public void testTransactions() throws IOException {
public void test() throws IOException {
testPlan(
threadGroup(2, 10,
httpSampler("http://my.service/items"),
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/request-generation/timers/throughput-timer.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PerformanceTest {

@Test
public void testPerformance() throws Exception {
TestPlanStats stats = testPlan(
testPlan(
threadGroup(10, Duration.ofSeconds(10),
throughputTimer(120),
httpSampler("http://my.service")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ public static DslFlowControlAction threadPause(Duration duration) {
}

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

/**
* Sames as {@link #constantTimer(Duration)} but allowing tu use a JMeter expression.
* Same as {@link #constantTimer(Duration)} but allowing tu use a JMeter expression.
* <p>
* For example, you can set a delay depending on the amount of time taken in last sample with
* something like <pre>{@code ${__groovy(5000 - prev.time)}}</pre>.
Expand All @@ -1716,19 +1716,15 @@ public static DslConstantTimer constantTimer(String duration) {
/**
* Builds a Uniform Random Timer which pauses the thread with a random time with uniform
* distribution.
*
* <p>
* The timer uses the minimum and maximum durations to define the range of values to be used in
* the uniformly distributed selected value. These values differ from the parameters used in
* JMeter Uniform Random Timer element to make it simpler for general users to use. The generated
* JMeter test element uses as "constant delay offset" the minimum value, and as "maximum random
* delay" (maximum - minimum) value.
* </p>
*
* <p>
* EXAMPLE: wait at least 3 seconds and maximum of 10 seconds
* {@code uniformRandomTimer(Duration.ofSeconds(3), Duration.ofSeconds(10))}
* <p>
*
* @param minimum is used to set the constant delay of the Uniform Random Timer.
* @param maximum is used to set the maximum time the timer will be paused and will be used to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@
* just influence samplers in that Thread Group, or as a child of a sampler to only control that
* sampler.
* <p>
* When located at test plan level, this timer will use by default JMeter Constant Throughput Timer
* All active threads with non-sharing calculation mode. Which means that it will control that the
* total throughput for all requests in the test plan, across different thread groups, is at maximum
* the given one. If you locate inside a thread group (or sampler), it will use All active threads
* in current thread group with non-sharing mode. Avoiding potential problem of having two timers in
* separate thread group interfering with each other. Additionally, default calculation modes don't
* use shared modes since we have detected unexpected behaviors when using multiple timers.
* Basically, timers delays calculations interfering with each other due to single test plan or
* thread group mark used in calculation (instead of one per timer).
* When located at test plan level, this timer will use by default the
* {@link ThroughputMode#ALL_THREADS_EVEN} calculation mode. If you locate it inside a thread group
* (or sampler), it will use {@link ThroughputMode#THREAD_GROUP_EVEN} calculation mode, avoiding
* potential problem of having two timers in separate thread group interfering with each other.
* Additionally, default calculation modes don't use shared modes since we have detected unexpected
* behaviors when using multiple timers. Basically, timers delays calculations interfering with each
* other due to single test plan or thread group mark used in calculation (instead of one per
* timer).
* <p>
* If you want to change the default calculation method, then you can use
* {@link #calculation(ThroughputMode)} method. But in general avoid using it since may lead to
* {@link #calculation(ThroughputMode)} method. But in general, avoid using it, since may lead to
* unexpected behaviors.
*
* @since 1.5
Expand Down

0 comments on commit 0cd35b5

Please sign in to comment.