github.com/koko1123/flow-go-1@v0.29.6/module/mock/consensus_metrics.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 time "time" 10 ) 11 12 // ConsensusMetrics is an autogenerated mock type for the ConsensusMetrics type 13 type ConsensusMetrics struct { 14 mock.Mock 15 } 16 17 // CheckSealingDuration provides a mock function with given fields: duration 18 func (_m *ConsensusMetrics) CheckSealingDuration(duration time.Duration) { 19 _m.Called(duration) 20 } 21 22 // EmergencySeal provides a mock function with given fields: 23 func (_m *ConsensusMetrics) EmergencySeal() { 24 _m.Called() 25 } 26 27 // FinishBlockToSeal provides a mock function with given fields: blockID 28 func (_m *ConsensusMetrics) FinishBlockToSeal(blockID flow.Identifier) { 29 _m.Called(blockID) 30 } 31 32 // FinishCollectionToFinalized provides a mock function with given fields: collectionID 33 func (_m *ConsensusMetrics) FinishCollectionToFinalized(collectionID flow.Identifier) { 34 _m.Called(collectionID) 35 } 36 37 // OnApprovalProcessingDuration provides a mock function with given fields: duration 38 func (_m *ConsensusMetrics) OnApprovalProcessingDuration(duration time.Duration) { 39 _m.Called(duration) 40 } 41 42 // OnReceiptProcessingDuration provides a mock function with given fields: duration 43 func (_m *ConsensusMetrics) OnReceiptProcessingDuration(duration time.Duration) { 44 _m.Called(duration) 45 } 46 47 // StartBlockToSeal provides a mock function with given fields: blockID 48 func (_m *ConsensusMetrics) StartBlockToSeal(blockID flow.Identifier) { 49 _m.Called(blockID) 50 } 51 52 // StartCollectionToFinalized provides a mock function with given fields: collectionID 53 func (_m *ConsensusMetrics) StartCollectionToFinalized(collectionID flow.Identifier) { 54 _m.Called(collectionID) 55 } 56 57 type mockConstructorTestingTNewConsensusMetrics interface { 58 mock.TestingT 59 Cleanup(func()) 60 } 61 62 // NewConsensusMetrics creates a new instance of ConsensusMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 63 func NewConsensusMetrics(t mockConstructorTestingTNewConsensusMetrics) *ConsensusMetrics { 64 mock := &ConsensusMetrics{} 65 mock.Mock.Test(t) 66 67 t.Cleanup(func() { mock.AssertExpectations(t) }) 68 69 return mock 70 }