mirror of
https://github.com/soypat/lneto.git
synced 2026-09-11 00:59:30 +00:00
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:
@@ -41,7 +41,7 @@ func BenchmarkARPExchange(b *testing.B) {
|
||||
var buf [frameSize]byte
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
for b.Loop() {
|
||||
err = c1.StartResolveHardwareAddress6(queryAddr)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
@@ -130,7 +130,7 @@ func BenchmarkTCPHandshake(b *testing.B) {
|
||||
var pktbuf [frameSize]byte
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
for b.Loop() {
|
||||
// Setup connections.
|
||||
err = sv.ListenTCP4(svconn, svPort)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user