github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/gossip_sub_metrics.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	channels "github.com/onflow/flow-go/network/channels"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	p2pmsg "github.com/onflow/flow-go/network/p2p/message"
    10  
    11  	time "time"
    12  )
    13  
    14  // GossipSubMetrics is an autogenerated mock type for the GossipSubMetrics type
    15  type GossipSubMetrics struct {
    16  	mock.Mock
    17  }
    18  
    19  // AsyncProcessingFinished provides a mock function with given fields: duration
    20  func (_m *GossipSubMetrics) AsyncProcessingFinished(duration time.Duration) {
    21  	_m.Called(duration)
    22  }
    23  
    24  // AsyncProcessingStarted provides a mock function with given fields:
    25  func (_m *GossipSubMetrics) AsyncProcessingStarted() {
    26  	_m.Called()
    27  }
    28  
    29  // OnActiveClusterIDsNotSetErr provides a mock function with given fields:
    30  func (_m *GossipSubMetrics) OnActiveClusterIDsNotSetErr() {
    31  	_m.Called()
    32  }
    33  
    34  // OnAppSpecificScoreUpdated provides a mock function with given fields: _a0
    35  func (_m *GossipSubMetrics) OnAppSpecificScoreUpdated(_a0 float64) {
    36  	_m.Called(_a0)
    37  }
    38  
    39  // OnBehaviourPenaltyUpdated provides a mock function with given fields: _a0
    40  func (_m *GossipSubMetrics) OnBehaviourPenaltyUpdated(_a0 float64) {
    41  	_m.Called(_a0)
    42  }
    43  
    44  // OnControlMessagesTruncated provides a mock function with given fields: messageType, diff
    45  func (_m *GossipSubMetrics) OnControlMessagesTruncated(messageType p2pmsg.ControlMessageType, diff int) {
    46  	_m.Called(messageType, diff)
    47  }
    48  
    49  // OnFirstMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
    50  func (_m *GossipSubMetrics) OnFirstMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
    51  	_m.Called(_a0, _a1)
    52  }
    53  
    54  // OnGraftDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
    55  func (_m *GossipSubMetrics) OnGraftDuplicateTopicIdsExceedThreshold() {
    56  	_m.Called()
    57  }
    58  
    59  // OnGraftInvalidTopicIdsExceedThreshold provides a mock function with given fields:
    60  func (_m *GossipSubMetrics) OnGraftInvalidTopicIdsExceedThreshold() {
    61  	_m.Called()
    62  }
    63  
    64  // OnGraftMessageInspected provides a mock function with given fields: duplicateTopicIds, invalidTopicIds
    65  func (_m *GossipSubMetrics) OnGraftMessageInspected(duplicateTopicIds int, invalidTopicIds int) {
    66  	_m.Called(duplicateTopicIds, invalidTopicIds)
    67  }
    68  
    69  // OnIHaveControlMessageIdsTruncated provides a mock function with given fields: diff
    70  func (_m *GossipSubMetrics) OnIHaveControlMessageIdsTruncated(diff int) {
    71  	_m.Called(diff)
    72  }
    73  
    74  // OnIHaveDuplicateMessageIdsExceedThreshold provides a mock function with given fields:
    75  func (_m *GossipSubMetrics) OnIHaveDuplicateMessageIdsExceedThreshold() {
    76  	_m.Called()
    77  }
    78  
    79  // OnIHaveDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
    80  func (_m *GossipSubMetrics) OnIHaveDuplicateTopicIdsExceedThreshold() {
    81  	_m.Called()
    82  }
    83  
    84  // OnIHaveInvalidTopicIdsExceedThreshold provides a mock function with given fields:
    85  func (_m *GossipSubMetrics) OnIHaveInvalidTopicIdsExceedThreshold() {
    86  	_m.Called()
    87  }
    88  
    89  // OnIHaveMessageIDsReceived provides a mock function with given fields: channel, msgIdCount
    90  func (_m *GossipSubMetrics) OnIHaveMessageIDsReceived(channel string, msgIdCount int) {
    91  	_m.Called(channel, msgIdCount)
    92  }
    93  
    94  // OnIHaveMessagesInspected provides a mock function with given fields: duplicateTopicIds, duplicateMessageIds, invalidTopicIds
    95  func (_m *GossipSubMetrics) OnIHaveMessagesInspected(duplicateTopicIds int, duplicateMessageIds int, invalidTopicIds int) {
    96  	_m.Called(duplicateTopicIds, duplicateMessageIds, invalidTopicIds)
    97  }
    98  
    99  // OnIPColocationFactorUpdated provides a mock function with given fields: _a0
   100  func (_m *GossipSubMetrics) OnIPColocationFactorUpdated(_a0 float64) {
   101  	_m.Called(_a0)
   102  }
   103  
   104  // OnIWantCacheMissMessageIdsExceedThreshold provides a mock function with given fields:
   105  func (_m *GossipSubMetrics) OnIWantCacheMissMessageIdsExceedThreshold() {
   106  	_m.Called()
   107  }
   108  
   109  // OnIWantControlMessageIdsTruncated provides a mock function with given fields: diff
   110  func (_m *GossipSubMetrics) OnIWantControlMessageIdsTruncated(diff int) {
   111  	_m.Called(diff)
   112  }
   113  
   114  // OnIWantDuplicateMessageIdsExceedThreshold provides a mock function with given fields:
   115  func (_m *GossipSubMetrics) OnIWantDuplicateMessageIdsExceedThreshold() {
   116  	_m.Called()
   117  }
   118  
   119  // OnIWantMessageIDsReceived provides a mock function with given fields: msgIdCount
   120  func (_m *GossipSubMetrics) OnIWantMessageIDsReceived(msgIdCount int) {
   121  	_m.Called(msgIdCount)
   122  }
   123  
   124  // OnIWantMessagesInspected provides a mock function with given fields: duplicateCount, cacheMissCount
   125  func (_m *GossipSubMetrics) OnIWantMessagesInspected(duplicateCount int, cacheMissCount int) {
   126  	_m.Called(duplicateCount, cacheMissCount)
   127  }
   128  
   129  // OnIncomingRpcReceived provides a mock function with given fields: iHaveCount, iWantCount, graftCount, pruneCount, msgCount
   130  func (_m *GossipSubMetrics) OnIncomingRpcReceived(iHaveCount int, iWantCount int, graftCount int, pruneCount int, msgCount int) {
   131  	_m.Called(iHaveCount, iWantCount, graftCount, pruneCount, msgCount)
   132  }
   133  
   134  // OnInvalidControlMessageNotificationSent provides a mock function with given fields:
   135  func (_m *GossipSubMetrics) OnInvalidControlMessageNotificationSent() {
   136  	_m.Called()
   137  }
   138  
   139  // OnInvalidMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
   140  func (_m *GossipSubMetrics) OnInvalidMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
   141  	_m.Called(_a0, _a1)
   142  }
   143  
   144  // OnInvalidTopicIdDetectedForControlMessage provides a mock function with given fields: messageType
   145  func (_m *GossipSubMetrics) OnInvalidTopicIdDetectedForControlMessage(messageType p2pmsg.ControlMessageType) {
   146  	_m.Called(messageType)
   147  }
   148  
   149  // OnLocalMeshSizeUpdated provides a mock function with given fields: topic, size
   150  func (_m *GossipSubMetrics) OnLocalMeshSizeUpdated(topic string, size int) {
   151  	_m.Called(topic, size)
   152  }
   153  
   154  // OnLocalPeerJoinedTopic provides a mock function with given fields:
   155  func (_m *GossipSubMetrics) OnLocalPeerJoinedTopic() {
   156  	_m.Called()
   157  }
   158  
   159  // OnLocalPeerLeftTopic provides a mock function with given fields:
   160  func (_m *GossipSubMetrics) OnLocalPeerLeftTopic() {
   161  	_m.Called()
   162  }
   163  
   164  // OnMeshMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
   165  func (_m *GossipSubMetrics) OnMeshMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
   166  	_m.Called(_a0, _a1)
   167  }
   168  
   169  // OnMessageDeliveredToAllSubscribers provides a mock function with given fields: size
   170  func (_m *GossipSubMetrics) OnMessageDeliveredToAllSubscribers(size int) {
   171  	_m.Called(size)
   172  }
   173  
   174  // OnMessageDuplicate provides a mock function with given fields: size
   175  func (_m *GossipSubMetrics) OnMessageDuplicate(size int) {
   176  	_m.Called(size)
   177  }
   178  
   179  // OnMessageEnteredValidation provides a mock function with given fields: size
   180  func (_m *GossipSubMetrics) OnMessageEnteredValidation(size int) {
   181  	_m.Called(size)
   182  }
   183  
   184  // OnMessageRejected provides a mock function with given fields: size, reason
   185  func (_m *GossipSubMetrics) OnMessageRejected(size int, reason string) {
   186  	_m.Called(size, reason)
   187  }
   188  
   189  // OnOutboundRpcDropped provides a mock function with given fields:
   190  func (_m *GossipSubMetrics) OnOutboundRpcDropped() {
   191  	_m.Called()
   192  }
   193  
   194  // OnOverallPeerScoreUpdated provides a mock function with given fields: _a0
   195  func (_m *GossipSubMetrics) OnOverallPeerScoreUpdated(_a0 float64) {
   196  	_m.Called(_a0)
   197  }
   198  
   199  // OnPeerAddedToProtocol provides a mock function with given fields: protocol
   200  func (_m *GossipSubMetrics) OnPeerAddedToProtocol(protocol string) {
   201  	_m.Called(protocol)
   202  }
   203  
   204  // OnPeerGraftTopic provides a mock function with given fields: topic
   205  func (_m *GossipSubMetrics) OnPeerGraftTopic(topic string) {
   206  	_m.Called(topic)
   207  }
   208  
   209  // OnPeerPruneTopic provides a mock function with given fields: topic
   210  func (_m *GossipSubMetrics) OnPeerPruneTopic(topic string) {
   211  	_m.Called(topic)
   212  }
   213  
   214  // OnPeerRemovedFromProtocol provides a mock function with given fields:
   215  func (_m *GossipSubMetrics) OnPeerRemovedFromProtocol() {
   216  	_m.Called()
   217  }
   218  
   219  // OnPeerThrottled provides a mock function with given fields:
   220  func (_m *GossipSubMetrics) OnPeerThrottled() {
   221  	_m.Called()
   222  }
   223  
   224  // OnPruneDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
   225  func (_m *GossipSubMetrics) OnPruneDuplicateTopicIdsExceedThreshold() {
   226  	_m.Called()
   227  }
   228  
   229  // OnPruneInvalidTopicIdsExceedThreshold provides a mock function with given fields:
   230  func (_m *GossipSubMetrics) OnPruneInvalidTopicIdsExceedThreshold() {
   231  	_m.Called()
   232  }
   233  
   234  // OnPruneMessageInspected provides a mock function with given fields: duplicateTopicIds, invalidTopicIds
   235  func (_m *GossipSubMetrics) OnPruneMessageInspected(duplicateTopicIds int, invalidTopicIds int) {
   236  	_m.Called(duplicateTopicIds, invalidTopicIds)
   237  }
   238  
   239  // OnPublishMessageInspected provides a mock function with given fields: totalErrCount, invalidTopicIdsCount, invalidSubscriptionsCount, invalidSendersCount
   240  func (_m *GossipSubMetrics) OnPublishMessageInspected(totalErrCount int, invalidTopicIdsCount int, invalidSubscriptionsCount int, invalidSendersCount int) {
   241  	_m.Called(totalErrCount, invalidTopicIdsCount, invalidSubscriptionsCount, invalidSendersCount)
   242  }
   243  
   244  // OnPublishMessagesInspectionErrorExceedsThreshold provides a mock function with given fields:
   245  func (_m *GossipSubMetrics) OnPublishMessagesInspectionErrorExceedsThreshold() {
   246  	_m.Called()
   247  }
   248  
   249  // OnRpcReceived provides a mock function with given fields: msgCount, iHaveCount, iWantCount, graftCount, pruneCount
   250  func (_m *GossipSubMetrics) OnRpcReceived(msgCount int, iHaveCount int, iWantCount int, graftCount int, pruneCount int) {
   251  	_m.Called(msgCount, iHaveCount, iWantCount, graftCount, pruneCount)
   252  }
   253  
   254  // OnRpcRejectedFromUnknownSender provides a mock function with given fields:
   255  func (_m *GossipSubMetrics) OnRpcRejectedFromUnknownSender() {
   256  	_m.Called()
   257  }
   258  
   259  // OnRpcSent provides a mock function with given fields: msgCount, iHaveCount, iWantCount, graftCount, pruneCount
   260  func (_m *GossipSubMetrics) OnRpcSent(msgCount int, iHaveCount int, iWantCount int, graftCount int, pruneCount int) {
   261  	_m.Called(msgCount, iHaveCount, iWantCount, graftCount, pruneCount)
   262  }
   263  
   264  // OnTimeInMeshUpdated provides a mock function with given fields: _a0, _a1
   265  func (_m *GossipSubMetrics) OnTimeInMeshUpdated(_a0 channels.Topic, _a1 time.Duration) {
   266  	_m.Called(_a0, _a1)
   267  }
   268  
   269  // OnUndeliveredMessage provides a mock function with given fields:
   270  func (_m *GossipSubMetrics) OnUndeliveredMessage() {
   271  	_m.Called()
   272  }
   273  
   274  // OnUnstakedPeerInspectionFailed provides a mock function with given fields:
   275  func (_m *GossipSubMetrics) OnUnstakedPeerInspectionFailed() {
   276  	_m.Called()
   277  }
   278  
   279  // SetWarningStateCount provides a mock function with given fields: _a0
   280  func (_m *GossipSubMetrics) SetWarningStateCount(_a0 uint) {
   281  	_m.Called(_a0)
   282  }
   283  
   284  type mockConstructorTestingTNewGossipSubMetrics interface {
   285  	mock.TestingT
   286  	Cleanup(func())
   287  }
   288  
   289  // NewGossipSubMetrics creates a new instance of GossipSubMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   290  func NewGossipSubMetrics(t mockConstructorTestingTNewGossipSubMetrics) *GossipSubMetrics {
   291  	mock := &GossipSubMetrics{}
   292  	mock.Mock.Test(t)
   293  
   294  	t.Cleanup(func() { mock.AssertExpectations(t) })
   295  
   296  	return mock
   297  }