File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ func BenchmarkManager_GetPendingHeaders(b *testing.B) {
63
63
ctx := context .Background ()
64
64
b .ReportAllocs ()
65
65
b .ResetTimer ()
66
- for i := 0 ; i < b . N ; i ++ {
66
+ for b . Loop () {
67
67
hs , err := m .GetPendingHeaders (ctx )
68
68
if err != nil {
69
69
b .Fatal (err )
@@ -84,7 +84,7 @@ func BenchmarkManager_GetPendingData(b *testing.B) {
84
84
ctx := context .Background ()
85
85
b .ReportAllocs ()
86
86
b .ResetTimer ()
87
- for i := 0 ; i < b . N ; i ++ {
87
+ for b . Loop () {
88
88
ds , err := m .GetPendingData (ctx )
89
89
if err != nil {
90
90
b .Fatal (err )
@@ -106,7 +106,7 @@ func BenchmarkManager_PendingEventsSnapshot(b *testing.B) {
106
106
}
107
107
b .ReportAllocs ()
108
108
b .ResetTimer ()
109
- for i := 0 ; i < b . N ; i ++ {
109
+ for b . Loop () {
110
110
ev := m .GetPendingEvents ()
111
111
if len (ev ) == 0 {
112
112
b .Fatal ("unexpected empty events" )
You can’t perform that action at this time.
0 commit comments