github.com/koko1123/flow-go-1@v0.29.6/module/mock/transaction_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 // TransactionMetrics is an autogenerated mock type for the TransactionMetrics type 13 type TransactionMetrics struct { 14 mock.Mock 15 } 16 17 // ScriptExecuted provides a mock function with given fields: dur, size 18 func (_m *TransactionMetrics) ScriptExecuted(dur time.Duration, size int) { 19 _m.Called(dur, size) 20 } 21 22 // TransactionExecuted provides a mock function with given fields: txID, when 23 func (_m *TransactionMetrics) TransactionExecuted(txID flow.Identifier, when time.Time) { 24 _m.Called(txID, when) 25 } 26 27 // TransactionExpired provides a mock function with given fields: txID 28 func (_m *TransactionMetrics) TransactionExpired(txID flow.Identifier) { 29 _m.Called(txID) 30 } 31 32 // TransactionFinalized provides a mock function with given fields: txID, when 33 func (_m *TransactionMetrics) TransactionFinalized(txID flow.Identifier, when time.Time) { 34 _m.Called(txID, when) 35 } 36 37 // TransactionReceived provides a mock function with given fields: txID, when 38 func (_m *TransactionMetrics) TransactionReceived(txID flow.Identifier, when time.Time) { 39 _m.Called(txID, when) 40 } 41 42 // TransactionResultFetched provides a mock function with given fields: dur, size 43 func (_m *TransactionMetrics) TransactionResultFetched(dur time.Duration, size int) { 44 _m.Called(dur, size) 45 } 46 47 // TransactionSubmissionFailed provides a mock function with given fields: 48 func (_m *TransactionMetrics) TransactionSubmissionFailed() { 49 _m.Called() 50 } 51 52 // UpdateExecutionReceiptMaxHeight provides a mock function with given fields: height 53 func (_m *TransactionMetrics) UpdateExecutionReceiptMaxHeight(height uint64) { 54 _m.Called(height) 55 } 56 57 type mockConstructorTestingTNewTransactionMetrics interface { 58 mock.TestingT 59 Cleanup(func()) 60 } 61 62 // NewTransactionMetrics creates a new instance of TransactionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 63 func NewTransactionMetrics(t mockConstructorTestingTNewTransactionMetrics) *TransactionMetrics { 64 mock := &TransactionMetrics{} 65 mock.Mock.Test(t) 66 67 t.Cleanup(func() { mock.AssertExpectations(t) }) 68 69 return mock 70 }