rpc: using testing.B.Loop

Signed-off-by: yajianggroup <yajianggroup@outlook.com>
This commit is contained in:
yajianggroup 2025-09-23 15:55:51 +08:00
parent 2872242045
commit 4698806eca

View file

@ -259,8 +259,8 @@ func BenchmarkNotify(b *testing.B) {
ParentHash: common.HexToHash("0x01"), ParentHash: common.HexToHash("0x01"),
Number: big.NewInt(100), Number: big.NewInt(100),
} }
b.ResetTimer()
for i := 0; i < b.N; i++ { for b.Loop() {
notifier.Notify(id, msg) notifier.Notify(id, msg)
} }
} }