HTTP load generator, ApacheBench (ab) replacement
Go
Increase channel buffer size.
Mehmet Akinb5a01c84e9da
diff --git a/commands/run.go b/commands/run.goindex f99ad43..3aeeb7d 100644--- a/commands/run.go+++ b/commands/run.go@@ -56,7 +56,7 @@ func (b *Boom) run() {}wg := new(sync.WaitGroup)- ch := make(chan *http.Request)+ ch := make(chan *http.Request, c)// Create c amount worker goroutines.for i := 0; i < c; i++ {wg.Add(1)@@ -73,7 +73,7 @@ func (b *Boom) run() {func (b *Boom) worker(clientChan chan *http.Request, wg *sync.WaitGroup) {defer wg.Done()-+ // Pick one request from channel and process.for req := range clientChan {s := time.Now()resp, err := b.Client.Do(req)