File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,6 @@ type Generator struct {
257257 dataCancel context.CancelFunc
258258 gun Gun
259259 vu VirtualUser
260- vusMu * sync.Mutex
261260 vus []VirtualUser
262261 ResponsesChan chan * Response
263262 Responses * Responses
@@ -321,7 +320,6 @@ func NewGenerator(cfg *Config) (*Generator, error) {
321320 dataCancel : dataCancel ,
322321 gun : cfg .Gun ,
323322 vu : cfg .VU ,
324- vusMu : & sync.Mutex {},
325323 Responses : NewResponses (rch ),
326324 ResponsesChan : rch ,
327325 labels : ls ,
@@ -381,9 +379,7 @@ func (g *Generator) runExecuteLoop() {
381379 for i := 0 ; i < int (vus ); i ++ {
382380 inst := g .vu .Clone (g )
383381 g .runVU (inst )
384- g .vusMu .Lock ()
385382 g .vus = append (g .vus , inst )
386- g .vusMu .Unlock ()
387383 }
388384 }
389385}
@@ -512,7 +508,6 @@ func (g *Generator) processSegment() bool {
512508 if oldVUs == newVUs {
513509 return false
514510 }
515- g .vusMu .Lock ()
516511 if oldVUs > g .currentSegment .From {
517512 for i := 0 ; i < vusToSpawn ; i ++ {
518513 g .vus [i ].Stop (g )
@@ -525,7 +520,6 @@ func (g *Generator) processSegment() bool {
525520 g .vus = append (g .vus , inst )
526521 }
527522 }
528- g .vusMu .Unlock ()
529523 }
530524 return false
531525}
You can’t perform that action at this time.
0 commit comments