github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/hotstuff_metrics.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 time "time" 9 ) 10 11 // HotstuffMetrics is an autogenerated mock type for the HotstuffMetrics type 12 type HotstuffMetrics struct { 13 mock.Mock 14 } 15 16 // BlockProcessingDuration provides a mock function with given fields: duration 17 func (_m *HotstuffMetrics) BlockProcessingDuration(duration time.Duration) { 18 _m.Called(duration) 19 } 20 21 // CommitteeProcessingDuration provides a mock function with given fields: duration 22 func (_m *HotstuffMetrics) CommitteeProcessingDuration(duration time.Duration) { 23 _m.Called(duration) 24 } 25 26 // CountSkipped provides a mock function with given fields: 27 func (_m *HotstuffMetrics) CountSkipped() { 28 _m.Called() 29 } 30 31 // CountTimeout provides a mock function with given fields: 32 func (_m *HotstuffMetrics) CountTimeout() { 33 _m.Called() 34 } 35 36 // HotStuffBusyDuration provides a mock function with given fields: duration, event 37 func (_m *HotstuffMetrics) HotStuffBusyDuration(duration time.Duration, event string) { 38 _m.Called(duration, event) 39 } 40 41 // HotStuffIdleDuration provides a mock function with given fields: duration 42 func (_m *HotstuffMetrics) HotStuffIdleDuration(duration time.Duration) { 43 _m.Called(duration) 44 } 45 46 // HotStuffWaitDuration provides a mock function with given fields: duration, event 47 func (_m *HotstuffMetrics) HotStuffWaitDuration(duration time.Duration, event string) { 48 _m.Called(duration, event) 49 } 50 51 // PayloadProductionDuration provides a mock function with given fields: duration 52 func (_m *HotstuffMetrics) PayloadProductionDuration(duration time.Duration) { 53 _m.Called(duration) 54 } 55 56 // SetCurView provides a mock function with given fields: view 57 func (_m *HotstuffMetrics) SetCurView(view uint64) { 58 _m.Called(view) 59 } 60 61 // SetQCView provides a mock function with given fields: view 62 func (_m *HotstuffMetrics) SetQCView(view uint64) { 63 _m.Called(view) 64 } 65 66 // SetTCView provides a mock function with given fields: view 67 func (_m *HotstuffMetrics) SetTCView(view uint64) { 68 _m.Called(view) 69 } 70 71 // SetTimeout provides a mock function with given fields: duration 72 func (_m *HotstuffMetrics) SetTimeout(duration time.Duration) { 73 _m.Called(duration) 74 } 75 76 // SignerProcessingDuration provides a mock function with given fields: duration 77 func (_m *HotstuffMetrics) SignerProcessingDuration(duration time.Duration) { 78 _m.Called(duration) 79 } 80 81 // TimeoutCollectorsRange provides a mock function with given fields: lowestRetainedView, newestViewCreatedCollector, activeCollectors 82 func (_m *HotstuffMetrics) TimeoutCollectorsRange(lowestRetainedView uint64, newestViewCreatedCollector uint64, activeCollectors int) { 83 _m.Called(lowestRetainedView, newestViewCreatedCollector, activeCollectors) 84 } 85 86 // TimeoutObjectProcessingDuration provides a mock function with given fields: duration 87 func (_m *HotstuffMetrics) TimeoutObjectProcessingDuration(duration time.Duration) { 88 _m.Called(duration) 89 } 90 91 // ValidatorProcessingDuration provides a mock function with given fields: duration 92 func (_m *HotstuffMetrics) ValidatorProcessingDuration(duration time.Duration) { 93 _m.Called(duration) 94 } 95 96 // VoteProcessingDuration provides a mock function with given fields: duration 97 func (_m *HotstuffMetrics) VoteProcessingDuration(duration time.Duration) { 98 _m.Called(duration) 99 } 100 101 type mockConstructorTestingTNewHotstuffMetrics interface { 102 mock.TestingT 103 Cleanup(func()) 104 } 105 106 // NewHotstuffMetrics creates a new instance of HotstuffMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 107 func NewHotstuffMetrics(t mockConstructorTestingTNewHotstuffMetrics) *HotstuffMetrics { 108 mock := &HotstuffMetrics{} 109 mock.Mock.Test(t) 110 111 t.Cleanup(func() { mock.AssertExpectations(t) }) 112 113 return mock 114 }