github.com/tenywen/fabric@v1.0.0-beta.0.20170620030522-a5b1ed380643/test/regression/daily/ledger_lte.py (about) 1 # Copyright IBM Corp. All Rights Reserved. 2 # 3 # SPDX-License-Identifier: Apache-2.0 4 # 5 6 import unittest 7 import subprocess 8 9 class perf_goleveldb(unittest.TestCase): 10 11 def test_FAB_3790_VaryNumParallelTxPerChain(self): 12 ''' 13 In this Performance test, we observe the performance (time to 14 complete a set number of Ledger operations) of the Ledger component, 15 with goleveldb as the state database. We vary the number of parallel 16 transactions per chain and observe the performance. 17 18 Passing criteria: Underlying LTE test completed successfully with 19 exit code 0 20 ''' 21 logfile = open("output_VaryNumParallelTxPerChain.log", "w") 22 returncode = subprocess.call( 23 "./runbenchmarks.sh varyNumParallelTxPerChain", 24 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 25 cwd='../../tools/LTE/scripts') 26 logfile.close() 27 self.assertEqual(returncode, 0, msg="VaryNumParallelTxPerChain " 28 "performance test failed. \nPlease check the logfile " 29 +logfile.name+" for more details.") 30 31 def test_FAB_3795_VaryNumChains(self): 32 ''' 33 In this Performance test, we observe the performance (time to 34 complete a set number of Ledger operations) of the Ledger component, 35 with goleveldb as the state database. We vary the number of chains 36 (ledgers). 37 38 Passing criteria: Underlying LTE test completed successfully with 39 exit code 0 40 ''' 41 logfile = open("output_VaryNumChains.log", "w") 42 returncode = subprocess.call( 43 "./runbenchmarks.sh varyNumChains", 44 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 45 cwd='../../tools/LTE/scripts') 46 logfile.close() 47 self.assertEqual(returncode, 0, msg="VaryNumChains performance test" 48 " failed. \nPlease check the logfile "+logfile.name+" for more " 49 "details.") 50 51 def test_FAB_3798_VaryNumParallelTxWithSingleChain(self): 52 ''' 53 In this Performance test, we observe the performance (time to 54 complete a set number of Ledger operations) of the Ledger component, 55 with goleveldb as the state database. We vary the number of parallel 56 transactions on a single chain. 57 58 Passing criteria: Underlying LTE test completed successfully with 59 exit code 0 60 ''' 61 logfile = open("output_VaryNumParallelTxWithSingleChain.log", "w") 62 returncode = subprocess.call( 63 "./runbenchmarks.sh varyNumParallelTxWithSingleChain", 64 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 65 cwd='../../tools/LTE/scripts') 66 logfile.close() 67 self.assertEqual(returncode, 0, msg="VaryNumParallelTxWithSingleChain " 68 "performance test failed. \nPlease check the logfile " 69 +logfile.name+" for more details.") 70 71 def test_FAB_3799_VaryNumChainsWithNoParallelism(self): 72 ''' 73 In this Performance test, we observe the performance (time to 74 complete a set number of Ledger operations) of the Ledger component, 75 with goleveldb as the state database. We vary the number of chains 76 without any parallelism within a single chain. 77 78 Passing criteria: Underlying LTE test completed successfully with 79 exit code 0 80 ''' 81 logfile = open("output_VaryNumChainsWithNoParallelism.log", "w") 82 returncode = subprocess.call( 83 "./runbenchmarks.sh varyNumChainsWithNoParallelism", 84 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 85 cwd='../../tools/LTE/scripts') 86 logfile.close() 87 self.assertEqual(returncode, 0, msg="varyNumChainsWithNoParallelism " 88 "performance test failed. \nPlease check the logfile " 89 +logfile.name+" for more details.") 90 91 def test_FAB_3801_VaryKVSize(self): 92 ''' 93 In this Performance test, we observe the performance (time to 94 complete a set number of Ledger operations) of the Ledger component, 95 with goleveldb as the state database. We vary the size of key-value. 96 97 Passing criteria: Underlying LTE test completed successfully with 98 exit code 0 99 ''' 100 logfile = open("output_VaryKVSize.log", "w") 101 returncode = subprocess.call( 102 "./runbenchmarks.sh varyKVSize", 103 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 104 cwd='../../tools/LTE/scripts') 105 logfile.close() 106 self.assertEqual(returncode, 0, msg="varyKVSize performance test" 107 " failed. \nPlease check the logfile "+logfile.name+" for more " 108 "details.") 109 110 def test_FAB_3802_VaryBatchSize(self): 111 ''' 112 In this Performance test, we observe the performance (time to 113 complete a set number of Ledger operations) of the Ledger component, 114 with goleveldb as the state database. We vary the value of the batch 115 size 116 117 Passing criteria: Underlying LTE test completed successfully with 118 exit code 0 119 ''' 120 logfile = open("output_VaryBatchSize.log", "w") 121 returncode = subprocess.call( 122 "./runbenchmarks.sh varyBatchSize", 123 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 124 cwd='../../tools/LTE/scripts') 125 logfile.close() 126 self.assertEqual(returncode, 0, msg="varyBatchSize performance test" 127 " failed. \nPlease check the logfile "+logfile.name+" for more " 128 "details.") 129 130 def test_FAB_3800_VaryNumKeysInEachTx(self): 131 ''' 132 In this Performance test, we observe the performance (time to 133 complete a set number of Ledger operations) of the Ledger component, 134 with goleveldb as the state database. We vary the number of keys in 135 each transaction. 136 137 Passing criteria: Underlying LTE test completed successfully with 138 exit code 0 139 ''' 140 logfile = open("output_VaryNumKeysInEachTx.log", "w") 141 returncode = subprocess.call( 142 "./runbenchmarks.sh varyNumKeysInEachTx", 143 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 144 cwd='../../tools/LTE/scripts') 145 logfile.close() 146 self.assertEqual(returncode, 0, msg="varyNumKeysInEachTx performance " 147 "test failed. \nPlease check the logfile "+logfile.name 148 +" for more details.") 149 150 def test_FAB_3803_VaryNumTxs(self): 151 ''' 152 In this Performance test, we observe the performance (time to 153 complete a set number of Ledger operations) of the Ledger component, 154 with goleveldb as the state database. We vary the number of 155 transactions carried out. 156 157 Passing criteria: Underlying LTE test completed successfully with 158 exit code 0 159 ''' 160 logfile = open("output_VaryNumTxs.log", "w") 161 returncode = subprocess.call( 162 "./runbenchmarks.sh varyNumTxs", 163 shell=True, stderr=subprocess.STDOUT, stdout=logfile, 164 cwd='../../tools/LTE/scripts') 165 logfile.close() 166 self.assertEqual(returncode, 0, msg="varyNumTxs performance test" 167 " failed. \nPlease check the logfile "+logfile.name+" for more " 168 "details.") 169 170 171 class perf_couchdb(unittest.TestCase): 172 @unittest.skip("WIP, skipping") 173 def test_FAB_3870_VaryNumParallelTxPerChain(self): 174 ''' 175 In this Performance test, we observe the performance (operations 176 per second) of the Ledger component, with CouchDB as the state 177 database, as we vary the number of parallel transactions per chain. 178 ''' 179 self.assertTrue(True) 180 181 @unittest.skip("WIP, skipping") 182 def test_FAB_3871_VaryNumChain(self): 183 ''' 184 In this Performance test, we observe the performance (operations 185 per second) of the Ledger component, with CouchDB as the state 186 database, as we vary the number of chains (ledgers). 187 ''' 188 self.assertTrue(True) 189 190 @unittest.skip("WIP, skipping") 191 def test_FAB_3872_VaryNumParallelTxWithSingleChain(self): 192 ''' 193 In this Performance test, we observe the performance (operations 194 per second) of the Ledger component, with CouchDB as the state 195 database, vary the number of parallel transactions on a single chain. 196 ''' 197 self.assertTrue(True) 198 199 @unittest.skip("WIP, skipping") 200 def test_FAB_3873_VaryNumChainWithNoParallelism(self): 201 ''' 202 In this Performance test, we observe the performance (operations 203 per second) of the Ledger component, with CouchDB as the state 204 database, as we vary the number of chains without any parallelism. 205 within a single chain. 206 ''' 207 self.assertTrue(True) 208 209 @unittest.skip("WIP, skipping") 210 def test_FAB_3874_VaryKVSize(self): 211 ''' 212 In this Performance test, we observe the performance (operations 213 per second) of the Ledger component, with CouchDB as the state 214 database, varying the size of key-value. 215 ''' 216 self.assertTrue(True) 217 218 @unittest.skip("WIP, skipping") 219 def test_FAB_3875_VaryBatchSize(self): 220 ''' 221 In this Performance test, we observe the performance (operations 222 per second) of the Ledger component, with CouchDB as the state 223 database, as we vary the value of the batch size. 224 ''' 225 self.assertTrue(True) 226 227 @unittest.skip("WIP, skipping") 228 def test_FAB_3876_VaryNumKeysInEachTX(self): 229 ''' 230 In this Performance test, we observe the performance (operations 231 per second) of the Ledger component, with CouchDB as the state 232 database, as we vary the number of keys in each transaction. 233 ''' 234 self.assertTrue(True) 235 236 @unittest.skip("WIP, skipping") 237 def test_FAB_3877_VaryNumTxs(self): 238 ''' 239 In this Performance test, we observe the performance (operations 240 per second) of the Ledger component, with CouchDB as the state 241 database, as we vary the number of transactions carried out. 242 ''' 243 self.assertTrue(True)