// the testcase allows for a 10% margin of error, but only fails if it
// consistently fails across three experiments, avoiding flakes.
func testInterleavedAllocations() error {
- const iters = 100000
+ const iters = 50000
// Sizes of the allocations performed by each experiment.
frames := []string{"main.allocInterleaved1", "main.allocInterleaved2", "main.allocInterleaved3"}
a16k = new([16 * 1024]byte)
a256 = new([256]byte)
// Test verification depends on these lines being contiguous.
+
+ // Slow down the allocation rate to avoid #52433.
+ runtime.Gosched()
}
}
// the testcase allows for a 10% margin of error, but only fails if it
// consistently fails across three experiments, avoiding flakes.
func testSmallAllocations() error {
- const iters = 100000
+ const iters = 50000
// Sizes of the allocations performed by each experiment.
sizes := []int64{1024, 512, 256}
frames := []string{"main.allocSmall1", "main.allocSmall2", "main.allocSmall3"}
a1k = new([1024]byte)
a512 = new([512]byte)
a256 = new([256]byte)
+
+ // Slow down the allocation rate to avoid #52433.
+ runtime.Gosched()
}
}