-
Notifications
You must be signed in to change notification settings - Fork 175
/
transaction_metrics.go
70 lines (54 loc) · 2.2 KB
/
transaction_metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Code generated by mockery v2.13.1. DO NOT EDIT.
package mock
import (
flow "github.com/onflow/flow-go/model/flow"
mock "github.com/stretchr/testify/mock"
time "time"
)
// TransactionMetrics is an autogenerated mock type for the TransactionMetrics type
type TransactionMetrics struct {
mock.Mock
}
// ScriptExecuted provides a mock function with given fields: dur, size
func (_m *TransactionMetrics) ScriptExecuted(dur time.Duration, size int) {
_m.Called(dur, size)
}
// TransactionExecuted provides a mock function with given fields: txID, when
func (_m *TransactionMetrics) TransactionExecuted(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionExpired provides a mock function with given fields: txID
func (_m *TransactionMetrics) TransactionExpired(txID flow.Identifier) {
_m.Called(txID)
}
// TransactionFinalized provides a mock function with given fields: txID, when
func (_m *TransactionMetrics) TransactionFinalized(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionReceived provides a mock function with given fields: txID, when
func (_m *TransactionMetrics) TransactionReceived(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionResultFetched provides a mock function with given fields: dur, size
func (_m *TransactionMetrics) TransactionResultFetched(dur time.Duration, size int) {
_m.Called(dur, size)
}
// TransactionSubmissionFailed provides a mock function with given fields:
func (_m *TransactionMetrics) TransactionSubmissionFailed() {
_m.Called()
}
// UpdateExecutionReceiptMaxHeight provides a mock function with given fields: height
func (_m *TransactionMetrics) UpdateExecutionReceiptMaxHeight(height uint64) {
_m.Called(height)
}
type mockConstructorTestingTNewTransactionMetrics interface {
mock.TestingT
Cleanup(func())
}
// 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.
func NewTransactionMetrics(t mockConstructorTestingTNewTransactionMetrics) *TransactionMetrics {
mock := &TransactionMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}