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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	flow "github.com/onflow/flow-go/model/flow"
     9  	metrics "github.com/slok/go-http-metrics/metrics"
    10  
    11  	mock "github.com/stretchr/testify/mock"
    12  
    13  	time "time"
    14  )
    15  
    16  // AccessMetrics is an autogenerated mock type for the AccessMetrics type
    17  type AccessMetrics struct {
    18  	mock.Mock
    19  }
    20  
    21  // AddInflightRequests provides a mock function with given fields: ctx, props, quantity
    22  func (_m *AccessMetrics) AddInflightRequests(ctx context.Context, props metrics.HTTPProperties, quantity int) {
    23  	_m.Called(ctx, props, quantity)
    24  }
    25  
    26  // AddTotalRequests provides a mock function with given fields: ctx, method, routeName
    27  func (_m *AccessMetrics) AddTotalRequests(ctx context.Context, method string, routeName string) {
    28  	_m.Called(ctx, method, routeName)
    29  }
    30  
    31  // ConnectionAddedToPool provides a mock function with given fields:
    32  func (_m *AccessMetrics) ConnectionAddedToPool() {
    33  	_m.Called()
    34  }
    35  
    36  // ConnectionFromPoolEvicted provides a mock function with given fields:
    37  func (_m *AccessMetrics) ConnectionFromPoolEvicted() {
    38  	_m.Called()
    39  }
    40  
    41  // ConnectionFromPoolInvalidated provides a mock function with given fields:
    42  func (_m *AccessMetrics) ConnectionFromPoolInvalidated() {
    43  	_m.Called()
    44  }
    45  
    46  // ConnectionFromPoolReused provides a mock function with given fields:
    47  func (_m *AccessMetrics) ConnectionFromPoolReused() {
    48  	_m.Called()
    49  }
    50  
    51  // ConnectionFromPoolUpdated provides a mock function with given fields:
    52  func (_m *AccessMetrics) ConnectionFromPoolUpdated() {
    53  	_m.Called()
    54  }
    55  
    56  // NewConnectionEstablished provides a mock function with given fields:
    57  func (_m *AccessMetrics) NewConnectionEstablished() {
    58  	_m.Called()
    59  }
    60  
    61  // ObserveHTTPRequestDuration provides a mock function with given fields: ctx, props, duration
    62  func (_m *AccessMetrics) ObserveHTTPRequestDuration(ctx context.Context, props metrics.HTTPReqProperties, duration time.Duration) {
    63  	_m.Called(ctx, props, duration)
    64  }
    65  
    66  // ObserveHTTPResponseSize provides a mock function with given fields: ctx, props, sizeBytes
    67  func (_m *AccessMetrics) ObserveHTTPResponseSize(ctx context.Context, props metrics.HTTPReqProperties, sizeBytes int64) {
    68  	_m.Called(ctx, props, sizeBytes)
    69  }
    70  
    71  // ScriptExecuted provides a mock function with given fields: dur, size
    72  func (_m *AccessMetrics) ScriptExecuted(dur time.Duration, size int) {
    73  	_m.Called(dur, size)
    74  }
    75  
    76  // ScriptExecutionErrorLocal provides a mock function with given fields:
    77  func (_m *AccessMetrics) ScriptExecutionErrorLocal() {
    78  	_m.Called()
    79  }
    80  
    81  // ScriptExecutionErrorMatch provides a mock function with given fields:
    82  func (_m *AccessMetrics) ScriptExecutionErrorMatch() {
    83  	_m.Called()
    84  }
    85  
    86  // ScriptExecutionErrorMismatch provides a mock function with given fields:
    87  func (_m *AccessMetrics) ScriptExecutionErrorMismatch() {
    88  	_m.Called()
    89  }
    90  
    91  // ScriptExecutionErrorOnExecutionNode provides a mock function with given fields:
    92  func (_m *AccessMetrics) ScriptExecutionErrorOnExecutionNode() {
    93  	_m.Called()
    94  }
    95  
    96  // ScriptExecutionNotIndexed provides a mock function with given fields:
    97  func (_m *AccessMetrics) ScriptExecutionNotIndexed() {
    98  	_m.Called()
    99  }
   100  
   101  // ScriptExecutionResultMatch provides a mock function with given fields:
   102  func (_m *AccessMetrics) ScriptExecutionResultMatch() {
   103  	_m.Called()
   104  }
   105  
   106  // ScriptExecutionResultMismatch provides a mock function with given fields:
   107  func (_m *AccessMetrics) ScriptExecutionResultMismatch() {
   108  	_m.Called()
   109  }
   110  
   111  // TotalConnectionsInPool provides a mock function with given fields: connectionCount, connectionPoolSize
   112  func (_m *AccessMetrics) TotalConnectionsInPool(connectionCount uint, connectionPoolSize uint) {
   113  	_m.Called(connectionCount, connectionPoolSize)
   114  }
   115  
   116  // TransactionExecuted provides a mock function with given fields: txID, when
   117  func (_m *AccessMetrics) TransactionExecuted(txID flow.Identifier, when time.Time) {
   118  	_m.Called(txID, when)
   119  }
   120  
   121  // TransactionExpired provides a mock function with given fields: txID
   122  func (_m *AccessMetrics) TransactionExpired(txID flow.Identifier) {
   123  	_m.Called(txID)
   124  }
   125  
   126  // TransactionFinalized provides a mock function with given fields: txID, when
   127  func (_m *AccessMetrics) TransactionFinalized(txID flow.Identifier, when time.Time) {
   128  	_m.Called(txID, when)
   129  }
   130  
   131  // TransactionReceived provides a mock function with given fields: txID, when
   132  func (_m *AccessMetrics) TransactionReceived(txID flow.Identifier, when time.Time) {
   133  	_m.Called(txID, when)
   134  }
   135  
   136  // TransactionResultFetched provides a mock function with given fields: dur, size
   137  func (_m *AccessMetrics) TransactionResultFetched(dur time.Duration, size int) {
   138  	_m.Called(dur, size)
   139  }
   140  
   141  // TransactionSubmissionFailed provides a mock function with given fields:
   142  func (_m *AccessMetrics) TransactionSubmissionFailed() {
   143  	_m.Called()
   144  }
   145  
   146  // UpdateExecutionReceiptMaxHeight provides a mock function with given fields: height
   147  func (_m *AccessMetrics) UpdateExecutionReceiptMaxHeight(height uint64) {
   148  	_m.Called(height)
   149  }
   150  
   151  // UpdateLastFullBlockHeight provides a mock function with given fields: height
   152  func (_m *AccessMetrics) UpdateLastFullBlockHeight(height uint64) {
   153  	_m.Called(height)
   154  }
   155  
   156  type mockConstructorTestingTNewAccessMetrics interface {
   157  	mock.TestingT
   158  	Cleanup(func())
   159  }
   160  
   161  // 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.
   162  func NewAccessMetrics(t mockConstructorTestingTNewAccessMetrics) *AccessMetrics {
   163  	mock := &AccessMetrics{}
   164  	mock.Mock.Test(t)
   165  
   166  	t.Cleanup(func() { mock.AssertExpectations(t) })
   167  
   168  	return mock
   169  }