testing.B.Loop() standardization and StackAsync.Debug improvement (#156)

* testing.B.Loop() standardization and StackAsync.Debug heap debugging improvement

* apply @MDr164 fixes

* @MDr164 great suggestions to prevent panic and print correct mallocs
This commit is contained in:
Pat Whittingslow
2026-07-17 11:59:27 -03:00
committed by GitHub
parent 766e03e90e
commit 157a8537a2
10 changed files with 64 additions and 45 deletions
+2 -2
View File
@@ -227,7 +227,7 @@ func BenchmarkSYNCookie_Generate(b *testing.B) {
clientISN := Value(0x12345678)
b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
sc.MakeSYNCookie(srcAddr, dstAddr, srcPort, dstPort, clientISN)
}
}
@@ -247,7 +247,7 @@ func BenchmarkSYNCookie_Validate(b *testing.B) {
ackNum := cookie + 1
b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
sc.ValidateSYNCookie(srcAddr, dstAddr, srcPort, dstPort, clientISN, ackNum)
}
}