Skip to content

Critical Section Controller

Configure the JMeter Critical Section Controller logic controllers: properties, defaults, and practical usage notes for building reliable load tests.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Part of the Logic Controllers category. Also documented in context in the full Component Reference.

Critical Section Controller

The Critical Section Controller ensures that its children elements (samplers/controllers, etc.) will be executed by only one thread as a named lock will be taken before executing children of controller.

The figure below shows an example of using Critical Section Controller, in the figure below 2 Critical Section Controllers ensure that:

  • DS2-\${__threadNum} is executed only by one thread at a time
  • DS4-\${__threadNum} is executed only by one thread at a time

Test Plan using Critical Section Controller Test Plan using Critical Section Controller

NameRequiredDescription
Lock NameYesLock that will be taken by controller, ensure you use different lock names for unrelated sections

^

On this page