Skip to content

armgit / hey

Public Imported from GitHub
0

HTTP load generator, ApacheBench (ab) replacement

Go

Merge pull request #5 from Tanerax/master

Burcu Dogan95565f19290a
diff --cc commands/run.go
index fb733c3,6a437d0..03db504
--- a/commands/run.go
+++ b/commands/run.go
@@@ -62,12 -68,16 +63,15 @@@ func (b *Boom) run()
wg.Wait()
}
-func (b *Boom) worker(clientChan chan int, wg *sync.WaitGroup) {
+func (b *Boom) worker(ch chan bool, wg *sync.WaitGroup) {
defer wg.Done()
+
+ buffer := make([]byte, 1024*1024*2)
+
// Pick one request from channel and process.
- for _ = range clientChan {
+ for _ = range ch {
s := time.Now()
resp, err := b.Client.Do(b.Req)
-
code := 0
if resp != nil {
code = resp.StatusCode