-
Notifications
You must be signed in to change notification settings - Fork 175
/
execution_metrics.go
230 lines (182 loc) · 8.33 KB
/
execution_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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
// 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"
)
// ExecutionMetrics is an autogenerated mock type for the ExecutionMetrics type
type ExecutionMetrics struct {
mock.Mock
}
// ChunkDataPackRequestProcessed provides a mock function with given fields:
func (_m *ExecutionMetrics) ChunkDataPackRequestProcessed() {
_m.Called()
}
// ExecutionBlockDataUploadFinished provides a mock function with given fields: dur
func (_m *ExecutionMetrics) ExecutionBlockDataUploadFinished(dur time.Duration) {
_m.Called(dur)
}
// ExecutionBlockDataUploadStarted provides a mock function with given fields:
func (_m *ExecutionMetrics) ExecutionBlockDataUploadStarted() {
_m.Called()
}
// ExecutionBlockExecuted provides a mock function with given fields: dur, compUsed, memoryUsed, eventCounts, eventSize, txCounts, colCounts
func (_m *ExecutionMetrics) ExecutionBlockExecuted(dur time.Duration, compUsed uint64, memoryUsed uint64, eventCounts int, eventSize int, txCounts int, colCounts int) {
_m.Called(dur, compUsed, memoryUsed, eventCounts, eventSize, txCounts, colCounts)
}
// ExecutionBlockExecutionEffortVectorComponent provides a mock function with given fields: _a0, _a1
func (_m *ExecutionMetrics) ExecutionBlockExecutionEffortVectorComponent(_a0 string, _a1 uint) {
_m.Called(_a0, _a1)
}
// ExecutionChunkDataPackGenerated provides a mock function with given fields: proofSize, numberOfTransactions
func (_m *ExecutionMetrics) ExecutionChunkDataPackGenerated(proofSize int, numberOfTransactions int) {
_m.Called(proofSize, numberOfTransactions)
}
// ExecutionCollectionExecuted provides a mock function with given fields: dur, compUsed, memoryUsed, eventCounts, eventSize, numberOfRegistersTouched, totalBytesWrittenToRegisters, txCounts
func (_m *ExecutionMetrics) ExecutionCollectionExecuted(dur time.Duration, compUsed uint64, memoryUsed uint64, eventCounts int, eventSize int, numberOfRegistersTouched int, totalBytesWrittenToRegisters int, txCounts int) {
_m.Called(dur, compUsed, memoryUsed, eventCounts, eventSize, numberOfRegistersTouched, totalBytesWrittenToRegisters, txCounts)
}
// ExecutionCollectionRequestRetried provides a mock function with given fields:
func (_m *ExecutionMetrics) ExecutionCollectionRequestRetried() {
_m.Called()
}
// ExecutionCollectionRequestSent provides a mock function with given fields:
func (_m *ExecutionMetrics) ExecutionCollectionRequestSent() {
_m.Called()
}
// ExecutionComputationResultUploadRetried provides a mock function with given fields:
func (_m *ExecutionMetrics) ExecutionComputationResultUploadRetried() {
_m.Called()
}
// ExecutionComputationResultUploaded provides a mock function with given fields:
func (_m *ExecutionMetrics) ExecutionComputationResultUploaded() {
_m.Called()
}
// ExecutionLastExecutedBlockHeight provides a mock function with given fields: height
func (_m *ExecutionMetrics) ExecutionLastExecutedBlockHeight(height uint64) {
_m.Called(height)
}
// ExecutionScriptExecuted provides a mock function with given fields: dur, compUsed, memoryUsed, memoryEstimate
func (_m *ExecutionMetrics) ExecutionScriptExecuted(dur time.Duration, compUsed uint64, memoryUsed uint64, memoryEstimate uint64) {
_m.Called(dur, compUsed, memoryUsed, memoryEstimate)
}
// ExecutionStorageStateCommitment provides a mock function with given fields: bytes
func (_m *ExecutionMetrics) ExecutionStorageStateCommitment(bytes int64) {
_m.Called(bytes)
}
// ExecutionSync provides a mock function with given fields: syncing
func (_m *ExecutionMetrics) ExecutionSync(syncing bool) {
_m.Called(syncing)
}
// ExecutionTransactionExecuted provides a mock function with given fields: dur, compUsed, memoryUsed, actualMemoryUsed, eventCounts, eventSize, failed
func (_m *ExecutionMetrics) ExecutionTransactionExecuted(dur time.Duration, compUsed uint64, memoryUsed uint64, actualMemoryUsed uint64, eventCounts int, eventSize int, failed bool) {
_m.Called(dur, compUsed, memoryUsed, actualMemoryUsed, eventCounts, eventSize, failed)
}
// FinishBlockReceivedToExecuted provides a mock function with given fields: blockID
func (_m *ExecutionMetrics) FinishBlockReceivedToExecuted(blockID flow.Identifier) {
_m.Called(blockID)
}
// ForestApproxMemorySize provides a mock function with given fields: bytes
func (_m *ExecutionMetrics) ForestApproxMemorySize(bytes uint64) {
_m.Called(bytes)
}
// ForestNumberOfTrees provides a mock function with given fields: number
func (_m *ExecutionMetrics) ForestNumberOfTrees(number uint64) {
_m.Called(number)
}
// LatestTrieMaxDepthTouched provides a mock function with given fields: maxDepth
func (_m *ExecutionMetrics) LatestTrieMaxDepthTouched(maxDepth uint16) {
_m.Called(maxDepth)
}
// LatestTrieRegCount provides a mock function with given fields: number
func (_m *ExecutionMetrics) LatestTrieRegCount(number uint64) {
_m.Called(number)
}
// LatestTrieRegCountDiff provides a mock function with given fields: number
func (_m *ExecutionMetrics) LatestTrieRegCountDiff(number int64) {
_m.Called(number)
}
// LatestTrieRegSize provides a mock function with given fields: size
func (_m *ExecutionMetrics) LatestTrieRegSize(size uint64) {
_m.Called(size)
}
// LatestTrieRegSizeDiff provides a mock function with given fields: size
func (_m *ExecutionMetrics) LatestTrieRegSizeDiff(size int64) {
_m.Called(size)
}
// ProofSize provides a mock function with given fields: bytes
func (_m *ExecutionMetrics) ProofSize(bytes uint32) {
_m.Called(bytes)
}
// ReadDuration provides a mock function with given fields: duration
func (_m *ExecutionMetrics) ReadDuration(duration time.Duration) {
_m.Called(duration)
}
// ReadDurationPerItem provides a mock function with given fields: duration
func (_m *ExecutionMetrics) ReadDurationPerItem(duration time.Duration) {
_m.Called(duration)
}
// ReadValuesNumber provides a mock function with given fields: number
func (_m *ExecutionMetrics) ReadValuesNumber(number uint64) {
_m.Called(number)
}
// ReadValuesSize provides a mock function with given fields: byte
func (_m *ExecutionMetrics) ReadValuesSize(byte uint64) {
_m.Called(byte)
}
// RuntimeSetNumberOfAccounts provides a mock function with given fields: count
func (_m *ExecutionMetrics) RuntimeSetNumberOfAccounts(count uint64) {
_m.Called(count)
}
// RuntimeTransactionChecked provides a mock function with given fields: dur
func (_m *ExecutionMetrics) RuntimeTransactionChecked(dur time.Duration) {
_m.Called(dur)
}
// RuntimeTransactionInterpreted provides a mock function with given fields: dur
func (_m *ExecutionMetrics) RuntimeTransactionInterpreted(dur time.Duration) {
_m.Called(dur)
}
// RuntimeTransactionParsed provides a mock function with given fields: dur
func (_m *ExecutionMetrics) RuntimeTransactionParsed(dur time.Duration) {
_m.Called(dur)
}
// StartBlockReceivedToExecuted provides a mock function with given fields: blockID
func (_m *ExecutionMetrics) StartBlockReceivedToExecuted(blockID flow.Identifier) {
_m.Called(blockID)
}
// UpdateCollectionMaxHeight provides a mock function with given fields: height
func (_m *ExecutionMetrics) UpdateCollectionMaxHeight(height uint64) {
_m.Called(height)
}
// UpdateCount provides a mock function with given fields:
func (_m *ExecutionMetrics) UpdateCount() {
_m.Called()
}
// UpdateDuration provides a mock function with given fields: duration
func (_m *ExecutionMetrics) UpdateDuration(duration time.Duration) {
_m.Called(duration)
}
// UpdateDurationPerItem provides a mock function with given fields: duration
func (_m *ExecutionMetrics) UpdateDurationPerItem(duration time.Duration) {
_m.Called(duration)
}
// UpdateValuesNumber provides a mock function with given fields: number
func (_m *ExecutionMetrics) UpdateValuesNumber(number uint64) {
_m.Called(number)
}
// UpdateValuesSize provides a mock function with given fields: byte
func (_m *ExecutionMetrics) UpdateValuesSize(byte uint64) {
_m.Called(byte)
}
type mockConstructorTestingTNewExecutionMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewExecutionMetrics creates a new instance of ExecutionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewExecutionMetrics(t mockConstructorTestingTNewExecutionMetrics) *ExecutionMetrics {
mock := &ExecutionMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}