Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
255 views
in Technique[技术] by (71.8m points)

java - Critical section controller accessed by 10 threads at same time

I have single thread group A with 100 users that run the following logic:

*REQUEST1 
*REQUEST2
*CRITICAL_SECTION_CONTROLLER 
   -REQUEST3
*TIMER TO WAIT ALL THREADS FINISH
*REQUEST4

I would like to run the REQUEST3 by groups, only for 10 users at same time. (now only one user can at time by the section controller)

Is it possible?

question from:https://stackoverflow.com/questions/65922843/critical-section-controller-accessed-by-10-threads-at-same-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You're using the wrong configuration element, go for Synchronizing Timer, add it as a child of the request 3 and set "Number of simulated users to group by" to 10

enter image description here

Also be aware that if you put a Timer at the same level as all requests it is executed before each request in its scope, each JMeter thread processes Samplers and stuff individually, if you want to run Request 4 with all 100 users - add the same Synchronizing Timer as its child and set "Number of simulated users to group by" to 100

More information: Using the JMeter Synchronizing Timer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...