File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func BenchmarkManager_GetPendingHeaders(b *testing.B) {
6363 ctx := context .Background ()
6464 b .ReportAllocs ()
6565 b .ResetTimer ()
66- for i := 0 ; i < b . N ; i ++ {
66+ for b . Loop () {
6767 hs , err := m .GetPendingHeaders (ctx )
6868 if err != nil {
6969 b .Fatal (err )
@@ -84,7 +84,7 @@ func BenchmarkManager_GetPendingData(b *testing.B) {
8484 ctx := context .Background ()
8585 b .ReportAllocs ()
8686 b .ResetTimer ()
87- for i := 0 ; i < b . N ; i ++ {
87+ for b . Loop () {
8888 ds , err := m .GetPendingData (ctx )
8989 if err != nil {
9090 b .Fatal (err )
@@ -106,7 +106,7 @@ func BenchmarkManager_PendingEventsSnapshot(b *testing.B) {
106106 }
107107 b .ReportAllocs ()
108108 b .ResetTimer ()
109- for i := 0 ; i < b . N ; i ++ {
109+ for b . Loop () {
110110 ev := m .GetPendingEvents ()
111111 if len (ev ) == 0 {
112112 b .Fatal ("unexpected empty events" )
You can’t perform that action at this time.
0 commit comments