Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
470 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...