Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Jun 20, 2023
1 parent d6afa02 commit 4605763
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions profiler_test.go
Expand Up @@ -540,18 +540,15 @@ func profilerBenchmark(t *testing.T, b *testing.B, withProfiling bool) {
}
b.ResetTimer()

const numRoutines = 1000
var wg sync.WaitGroup
wg.Add(b.N)
for i := 0; i < b.N; i++ {
var wg sync.WaitGroup
wg.Add(numRoutines)
for j := 0; j < numRoutines; j++ {
go func() {
_ = findPrimeNumber(30000)
wg.Done()
}()
}
wg.Wait()
go func() {
_ = findPrimeNumber(30000)
wg.Done()
}()
}
wg.Wait()

b.StopTimer()
if withProfiling {
Expand Down

0 comments on commit 4605763

Please sign in to comment.