-
Notifications
You must be signed in to change notification settings - Fork 178
/
hotstuff_metrics.go
114 lines (89 loc) · 3.67 KB
/
hotstuff_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
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
mock "github.com/stretchr/testify/mock"
time "time"
)
// HotstuffMetrics is an autogenerated mock type for the HotstuffMetrics type
type HotstuffMetrics struct {
mock.Mock
}
// BlockProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) BlockProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
// CommitteeProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) CommitteeProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
// CountSkipped provides a mock function with given fields:
func (_m *HotstuffMetrics) CountSkipped() {
_m.Called()
}
// CountTimeout provides a mock function with given fields:
func (_m *HotstuffMetrics) CountTimeout() {
_m.Called()
}
// HotStuffBusyDuration provides a mock function with given fields: duration, event
func (_m *HotstuffMetrics) HotStuffBusyDuration(duration time.Duration, event string) {
_m.Called(duration, event)
}
// HotStuffIdleDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) HotStuffIdleDuration(duration time.Duration) {
_m.Called(duration)
}
// HotStuffWaitDuration provides a mock function with given fields: duration, event
func (_m *HotstuffMetrics) HotStuffWaitDuration(duration time.Duration, event string) {
_m.Called(duration, event)
}
// PayloadProductionDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) PayloadProductionDuration(duration time.Duration) {
_m.Called(duration)
}
// SetCurView provides a mock function with given fields: view
func (_m *HotstuffMetrics) SetCurView(view uint64) {
_m.Called(view)
}
// SetQCView provides a mock function with given fields: view
func (_m *HotstuffMetrics) SetQCView(view uint64) {
_m.Called(view)
}
// SetTCView provides a mock function with given fields: view
func (_m *HotstuffMetrics) SetTCView(view uint64) {
_m.Called(view)
}
// SetTimeout provides a mock function with given fields: duration
func (_m *HotstuffMetrics) SetTimeout(duration time.Duration) {
_m.Called(duration)
}
// SignerProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) SignerProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
// TimeoutCollectorsRange provides a mock function with given fields: lowestRetainedView, newestViewCreatedCollector, activeCollectors
func (_m *HotstuffMetrics) TimeoutCollectorsRange(lowestRetainedView uint64, newestViewCreatedCollector uint64, activeCollectors int) {
_m.Called(lowestRetainedView, newestViewCreatedCollector, activeCollectors)
}
// TimeoutObjectProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) TimeoutObjectProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
// ValidatorProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) ValidatorProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
// VoteProcessingDuration provides a mock function with given fields: duration
func (_m *HotstuffMetrics) VoteProcessingDuration(duration time.Duration) {
_m.Called(duration)
}
type mockConstructorTestingTNewHotstuffMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewHotstuffMetrics creates a new instance of HotstuffMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewHotstuffMetrics(t mockConstructorTestingTNewHotstuffMetrics) *HotstuffMetrics {
mock := &HotstuffMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}