Skip to content

Commit

Permalink
Fixes bug in total number of requests made
Browse files Browse the repository at this point in the history
  • Loading branch information
vladComan0 committed Jun 4, 2024
1 parent ba87826 commit 28e670b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/data/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/vladComan0/performance-analyzer/pkg/tokens"
"math/rand"
"net/http"
"sync"
"time"
Expand Down Expand Up @@ -65,7 +64,7 @@ func (w *Worker) Start(wg *sync.WaitGroup, updateStatusFunc func(id int, status
go w.run(wg, requests)
}

for i := 0; i < w.RequestsPerTask; i++ {
for i := 0; i < w.Concurrency*w.RequestsPerTask; i++ {
requests <- i
}
close(requests)
Expand Down

0 comments on commit 28e670b

Please sign in to comment.