This commit is contained in:
knight0zh
2022-08-16 16:53:26 +08:00
parent 41f16ef6e9
commit 59e6f5d6c1
4 changed files with 10 additions and 8 deletions

View File

@@ -152,8 +152,8 @@ func BenchmarkQuadtree(b *testing.B) {
rand.Seed(time.Now().UnixNano())
for i := 0; i < b.N; i++ {
wg.Add(3000)
for j := 0; j < 1000; j++ {
wg.Add(30000)
for j := 0; j < 10000; j++ {
go func() {
tree.Add(&Entity{
X: float64(rand.Intn(5) * 10),
@@ -181,4 +181,4 @@ func BenchmarkQuadtree(b *testing.B) {
}()
}
}
}
}