-
Notifications
You must be signed in to change notification settings - Fork 175
/
access_metrics.go
169 lines (132 loc) · 5.41 KB
/
access_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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
context "context"
flow "github.com/onflow/flow-go/model/flow"
metrics "github.com/slok/go-http-metrics/metrics"
mock "github.com/stretchr/testify/mock"
time "time"
)
// AccessMetrics is an autogenerated mock type for the AccessMetrics type
type AccessMetrics struct {
mock.Mock
}
// AddInflightRequests provides a mock function with given fields: ctx, props, quantity
func (_m *AccessMetrics) AddInflightRequests(ctx context.Context, props metrics.HTTPProperties, quantity int) {
_m.Called(ctx, props, quantity)
}
// AddTotalRequests provides a mock function with given fields: ctx, method, routeName
func (_m *AccessMetrics) AddTotalRequests(ctx context.Context, method string, routeName string) {
_m.Called(ctx, method, routeName)
}
// ConnectionAddedToPool provides a mock function with given fields:
func (_m *AccessMetrics) ConnectionAddedToPool() {
_m.Called()
}
// ConnectionFromPoolEvicted provides a mock function with given fields:
func (_m *AccessMetrics) ConnectionFromPoolEvicted() {
_m.Called()
}
// ConnectionFromPoolInvalidated provides a mock function with given fields:
func (_m *AccessMetrics) ConnectionFromPoolInvalidated() {
_m.Called()
}
// ConnectionFromPoolReused provides a mock function with given fields:
func (_m *AccessMetrics) ConnectionFromPoolReused() {
_m.Called()
}
// ConnectionFromPoolUpdated provides a mock function with given fields:
func (_m *AccessMetrics) ConnectionFromPoolUpdated() {
_m.Called()
}
// NewConnectionEstablished provides a mock function with given fields:
func (_m *AccessMetrics) NewConnectionEstablished() {
_m.Called()
}
// ObserveHTTPRequestDuration provides a mock function with given fields: ctx, props, duration
func (_m *AccessMetrics) ObserveHTTPRequestDuration(ctx context.Context, props metrics.HTTPReqProperties, duration time.Duration) {
_m.Called(ctx, props, duration)
}
// ObserveHTTPResponseSize provides a mock function with given fields: ctx, props, sizeBytes
func (_m *AccessMetrics) ObserveHTTPResponseSize(ctx context.Context, props metrics.HTTPReqProperties, sizeBytes int64) {
_m.Called(ctx, props, sizeBytes)
}
// ScriptExecuted provides a mock function with given fields: dur, size
func (_m *AccessMetrics) ScriptExecuted(dur time.Duration, size int) {
_m.Called(dur, size)
}
// ScriptExecutionErrorLocal provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionErrorLocal() {
_m.Called()
}
// ScriptExecutionErrorMatch provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionErrorMatch() {
_m.Called()
}
// ScriptExecutionErrorMismatch provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionErrorMismatch() {
_m.Called()
}
// ScriptExecutionErrorOnExecutionNode provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionErrorOnExecutionNode() {
_m.Called()
}
// ScriptExecutionNotIndexed provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionNotIndexed() {
_m.Called()
}
// ScriptExecutionResultMatch provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionResultMatch() {
_m.Called()
}
// ScriptExecutionResultMismatch provides a mock function with given fields:
func (_m *AccessMetrics) ScriptExecutionResultMismatch() {
_m.Called()
}
// TotalConnectionsInPool provides a mock function with given fields: connectionCount, connectionPoolSize
func (_m *AccessMetrics) TotalConnectionsInPool(connectionCount uint, connectionPoolSize uint) {
_m.Called(connectionCount, connectionPoolSize)
}
// TransactionExecuted provides a mock function with given fields: txID, when
func (_m *AccessMetrics) TransactionExecuted(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionExpired provides a mock function with given fields: txID
func (_m *AccessMetrics) TransactionExpired(txID flow.Identifier) {
_m.Called(txID)
}
// TransactionFinalized provides a mock function with given fields: txID, when
func (_m *AccessMetrics) TransactionFinalized(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionReceived provides a mock function with given fields: txID, when
func (_m *AccessMetrics) TransactionReceived(txID flow.Identifier, when time.Time) {
_m.Called(txID, when)
}
// TransactionResultFetched provides a mock function with given fields: dur, size
func (_m *AccessMetrics) TransactionResultFetched(dur time.Duration, size int) {
_m.Called(dur, size)
}
// TransactionSubmissionFailed provides a mock function with given fields:
func (_m *AccessMetrics) TransactionSubmissionFailed() {
_m.Called()
}
// UpdateExecutionReceiptMaxHeight provides a mock function with given fields: height
func (_m *AccessMetrics) UpdateExecutionReceiptMaxHeight(height uint64) {
_m.Called(height)
}
// UpdateLastFullBlockHeight provides a mock function with given fields: height
func (_m *AccessMetrics) UpdateLastFullBlockHeight(height uint64) {
_m.Called(height)
}
type mockConstructorTestingTNewAccessMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewAccessMetrics creates a new instance of AccessMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAccessMetrics(t mockConstructorTestingTNewAccessMetrics) *AccessMetrics {
mock := &AccessMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}