github.com/cloudfoundry-attic/garden-linux@v0.333.2-candidate/metrics/fakes/fake_metrics.go (about) 1 // This file was generated by counterfeiter 2 package fakes 3 4 import ( 5 "sync" 6 7 "github.com/cloudfoundry-incubator/garden-linux/metrics" 8 ) 9 10 type FakeMetrics struct { 11 NumCPUStub func() int 12 numCPUMutex sync.RWMutex 13 numCPUArgsForCall []struct{} 14 numCPUReturns struct { 15 result1 int 16 } 17 NumGoroutineStub func() int 18 numGoroutineMutex sync.RWMutex 19 numGoroutineArgsForCall []struct{} 20 numGoroutineReturns struct { 21 result1 int 22 } 23 LoopDevicesStub func() int 24 loopDevicesMutex sync.RWMutex 25 loopDevicesArgsForCall []struct{} 26 loopDevicesReturns struct { 27 result1 int 28 } 29 BackingStoresStub func() int 30 backingStoresMutex sync.RWMutex 31 backingStoresArgsForCall []struct{} 32 backingStoresReturns struct { 33 result1 int 34 } 35 DepotDirsStub func() int 36 depotDirsMutex sync.RWMutex 37 depotDirsArgsForCall []struct{} 38 depotDirsReturns struct { 39 result1 int 40 } 41 } 42 43 func (fake *FakeMetrics) NumCPU() int { 44 fake.numCPUMutex.Lock() 45 fake.numCPUArgsForCall = append(fake.numCPUArgsForCall, struct{}{}) 46 fake.numCPUMutex.Unlock() 47 if fake.NumCPUStub != nil { 48 return fake.NumCPUStub() 49 } else { 50 return fake.numCPUReturns.result1 51 } 52 } 53 54 func (fake *FakeMetrics) NumCPUCallCount() int { 55 fake.numCPUMutex.RLock() 56 defer fake.numCPUMutex.RUnlock() 57 return len(fake.numCPUArgsForCall) 58 } 59 60 func (fake *FakeMetrics) NumCPUReturns(result1 int) { 61 fake.NumCPUStub = nil 62 fake.numCPUReturns = struct { 63 result1 int 64 }{result1} 65 } 66 67 func (fake *FakeMetrics) NumGoroutine() int { 68 fake.numGoroutineMutex.Lock() 69 fake.numGoroutineArgsForCall = append(fake.numGoroutineArgsForCall, struct{}{}) 70 fake.numGoroutineMutex.Unlock() 71 if fake.NumGoroutineStub != nil { 72 return fake.NumGoroutineStub() 73 } else { 74 return fake.numGoroutineReturns.result1 75 } 76 } 77 78 func (fake *FakeMetrics) NumGoroutineCallCount() int { 79 fake.numGoroutineMutex.RLock() 80 defer fake.numGoroutineMutex.RUnlock() 81 return len(fake.numGoroutineArgsForCall) 82 } 83 84 func (fake *FakeMetrics) NumGoroutineReturns(result1 int) { 85 fake.NumGoroutineStub = nil 86 fake.numGoroutineReturns = struct { 87 result1 int 88 }{result1} 89 } 90 91 func (fake *FakeMetrics) LoopDevices() int { 92 fake.loopDevicesMutex.Lock() 93 fake.loopDevicesArgsForCall = append(fake.loopDevicesArgsForCall, struct{}{}) 94 fake.loopDevicesMutex.Unlock() 95 if fake.LoopDevicesStub != nil { 96 return fake.LoopDevicesStub() 97 } else { 98 return fake.loopDevicesReturns.result1 99 } 100 } 101 102 func (fake *FakeMetrics) LoopDevicesCallCount() int { 103 fake.loopDevicesMutex.RLock() 104 defer fake.loopDevicesMutex.RUnlock() 105 return len(fake.loopDevicesArgsForCall) 106 } 107 108 func (fake *FakeMetrics) LoopDevicesReturns(result1 int) { 109 fake.LoopDevicesStub = nil 110 fake.loopDevicesReturns = struct { 111 result1 int 112 }{result1} 113 } 114 115 func (fake *FakeMetrics) BackingStores() int { 116 fake.backingStoresMutex.Lock() 117 fake.backingStoresArgsForCall = append(fake.backingStoresArgsForCall, struct{}{}) 118 fake.backingStoresMutex.Unlock() 119 if fake.BackingStoresStub != nil { 120 return fake.BackingStoresStub() 121 } else { 122 return fake.backingStoresReturns.result1 123 } 124 } 125 126 func (fake *FakeMetrics) BackingStoresCallCount() int { 127 fake.backingStoresMutex.RLock() 128 defer fake.backingStoresMutex.RUnlock() 129 return len(fake.backingStoresArgsForCall) 130 } 131 132 func (fake *FakeMetrics) BackingStoresReturns(result1 int) { 133 fake.BackingStoresStub = nil 134 fake.backingStoresReturns = struct { 135 result1 int 136 }{result1} 137 } 138 139 func (fake *FakeMetrics) DepotDirs() int { 140 fake.depotDirsMutex.Lock() 141 fake.depotDirsArgsForCall = append(fake.depotDirsArgsForCall, struct{}{}) 142 fake.depotDirsMutex.Unlock() 143 if fake.DepotDirsStub != nil { 144 return fake.DepotDirsStub() 145 } else { 146 return fake.depotDirsReturns.result1 147 } 148 } 149 150 func (fake *FakeMetrics) DepotDirsCallCount() int { 151 fake.depotDirsMutex.RLock() 152 defer fake.depotDirsMutex.RUnlock() 153 return len(fake.depotDirsArgsForCall) 154 } 155 156 func (fake *FakeMetrics) DepotDirsReturns(result1 int) { 157 fake.DepotDirsStub = nil 158 fake.depotDirsReturns = struct { 159 result1 int 160 }{result1} 161 } 162 163 var _ metrics.Metrics = new(FakeMetrics)