apache / apache/jmeter

Sample time elapsed is incorrect for transactions with constant time thread delays during ramp down

Open
#6,496 0 comments 0 reactions 0 assignees View on GitHub
defect to-triage
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

### Expected behavior

I expect that transaction sample elapsed time is the sum of child sample elapsed times excluding thread pause times which should be counted as idle time for the transaction. (Include duration of timer and pre-post processors in generated sample is set to false)

Alternatively the success flag could be set to false for the transaction.

This was working as expected in JMeter 2.9

### Actual behavior

As long as the threads are not stopped the behaviour is as expected.
But during ramp down or thread stop the pause times seem to be added to the transaction elapsed time, which is wrong and produces bad performance results.

Sample during normal execution:
```


http://example.com/


http://example.com/


http://example.com/

```

Sample during ramp down / thread stop:
```


http://example.com/


http://example.com/

```

### Steps to reproduce the problem

Execute the attached TestPlan.
open the generated rampdown-requests.xml and have a look at the elasped time of the last samples.

[rampDownIssue.jmx.txt](https://github.com/user-attachments/files/21736003/rampDownIssue.jmx.txt)

### JMeter Version

5.6.3

### Java Version

OpenJDK Runtime Environment Zulu17.46+19-CA (build 17.0.9+8-LTS)

### OS Version

MacOS 15.6

Contributor guide

Open the contributing guide

Research direction

Run the attached rampDownIssue.jmx.txt TestPlan and compare the normal and ramp-down entries in the generated rampdown-requests.xml. Trace how Transaction Controller samples calculate elapsed time when threads stop; done means pause time is excluded from transaction elapsed time, or the transaction is marked unsuccessful, with the reproduced behavior covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.