github.com/myafeier/fabric@v1.0.1-0.20170722181825-3a4b1f2bce86/test/regression/daily/systest_pte.py (about) 1 # Copyright IBM Corp. All Rights Reserved. 2 # 3 # SPDX-License-Identifier: Apache-2.0 4 # 5 6 ###################################################################### 7 # To execute: 8 # Install: sudo apt-get install python python-pytest 9 # Run on command line: py.test -v --junitxml results.xml ./systest_pte.py 10 11 import unittest 12 import subprocess 13 14 TEST_PASS_STRING="RESULT=PASS" 15 16 17 ###################################################################### 18 ### LEVELDB 19 ###################################################################### 20 21 class Perf_Stress_LevelDB(unittest.TestCase): 22 @unittest.skip("skipping") 23 def test_FAB3808_TPS_Queries_1_Thread_TinyNtwk(self): 24 ''' 25 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 26 Launch tiny network, use PTE in STRESS mode to continuously 27 send 10000 query transactions concurrently to 1 peer in both orgs, 28 calculate tps, and remove network and cleanup 29 ''' 30 # Replace TestPlaceholder.sh with actual test name, something like: 31 # ../../tools/PTE/tests/runSkeletonQueriesLevel.sh 32 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 33 self.assertIn(TEST_PASS_STRING, result) 34 35 @unittest.skip("skipping") 36 def test_FAB3811_TPS_Invokes_1_Thread_TinyNtwk(self): 37 ''' 38 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 39 Launch tiny network, use PTE in STRESS mode to continuously 40 send 10000 query transactions concurrently to 1 peer in both orgs, 41 query the ledger to ensure the last transaction was written, 42 calculate tps, remove network and cleanup 43 ''' 44 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 45 self.assertIn(TEST_PASS_STRING, result) 46 47 @unittest.skip("skipping") 48 def test_FAB3833_TPS_Queries_8_Thread_TinyNtwk(self): 49 ''' 50 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 51 Launch tiny network, use PTE in STRESS mode to continuously 52 send 10000 query transactions concurrently to 1 peer in both orgs, 53 calculate tps, and remove network and cleanup 54 ''' 55 # Replace TestPlaceholder.sh with actual test name, something like: 56 # ../../tools/PTE/tests/runSkeletonQueriesLevel.sh 57 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 58 self.assertIn(TEST_PASS_STRING, result) 59 60 @unittest.skip("skipping") 61 def test_FAB3835_TPS_Invokes_8_Thread_TinyNtwk(self): 62 ''' 63 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 64 Launch tiny network, use PTE in STRESS mode to continuously 65 send 10000 query transactions concurrently to 1 peer in both orgs, 66 query the ledger to ensure the last transaction was written, 67 calculate tps, remove network and cleanup 68 ''' 69 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 70 self.assertIn(TEST_PASS_STRING, result) 71 72 73 ###################################################################### 74 ### COUCHDB 75 ###################################################################### 76 77 class Perf_Stress_CouchDB(unittest.TestCase): 78 @unittest.skip("skipping") 79 def test_FAB3807_TPS_Queries_1_Thread_TinyNtwk(self): 80 ''' 81 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 82 Launch tiny network, use PTE in STRESS mode to continuously 83 send 10000 query transactions concurrently to 1 peer in both orgs, 84 calculate tps, and remove network and cleanup 85 ''' 86 # Replace TestPlaceholder.sh with actual test name, something like: 87 # ../../tools/PTE/tests/runSkeletonQueriesCouch.sh 88 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 89 self.assertIn(TEST_PASS_STRING, result) 90 91 @unittest.skip("skipping") 92 def test_FAB3810_TPS_Invokes_1_Thread_TinyNtwk(self): 93 ''' 94 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 95 Launch tiny network, use PTE in STRESS mode to continuously 96 send 10000 query transactions concurrently to 1 peer in both orgs, 97 query the ledger to ensure the last transaction was written, 98 calculate tps, remove network and cleanup 99 ''' 100 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 101 self.assertIn(TEST_PASS_STRING, result) 102 103 @unittest.skip("skipping") 104 def test_FAB3832_TPS_Queries_8_Thread_TinyNtwk(self): 105 ''' 106 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 107 Launch tiny network, use PTE in STRESS mode to continuously 108 send 10000 query transactions concurrently to 1 peer in both orgs, 109 calculate tps, and remove network and cleanup 110 ''' 111 # Replace TestPlaceholder.sh with actual test name, something like: 112 # ../../tools/PTE/tests/runSkeletonQueriesCouch.sh 113 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 114 self.assertIn(TEST_PASS_STRING, result) 115 116 @unittest.skip("skipping") 117 def test_FAB3834_TPS_Invokes_8_Thread_TinyNtwk(self): 118 ''' 119 Tiny Network: 1 Ord, 1 KB, 1 ZK, 2 Org, 2 Peers, 1 Chan, 1 CC, 2 thrds 120 Launch tiny network, use PTE in STRESS mode to continuously 121 send 10000 query transactions concurrently to 1 peer in both orgs, 122 query the ledger to ensure the last transaction was written, 123 calculate tps, remove network and cleanup 124 ''' 125 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 126 self.assertIn(TEST_PASS_STRING, result) 127 128 @unittest.skip("skipping") 129 def test_FAB3813_Baseline_StandardNtwk_8_Thread(self): 130 ''' 131 "Standard Network": 2 Orderers, 3 KafkaBrokers, 3 ZooKeepers, 132 2 Certificate Authorities (CAs - 1 per Org), 2 Organizations, 133 2 Peers per Org, 4 Peers, 2 Channels, 2 ChainCodes, 8 total threads. 134 Launch network, use PTE stress mode to send 10000 invoke transactions 135 concurrently to a peer in each org on all channels on all chaincodes, 136 query the ledger for each to ensure the last transaction was written, 137 calculate tps, remove network and cleanup 138 ''' 139 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 140 self.assertIn(TEST_PASS_STRING, result) 141 142 @unittest.skip("skipping") 143 def test_FAB3814_Payload_1Meg(self): 144 ''' 145 Standard Network: 2 Orderers, 3 KafkaBrokers, 3 ZooKeepers, 146 2 Certificate Authorities (CAs - 1 per Org), 2 Organizations, 147 2 Peers per Org, 4 Peers, 2 Channels, 2 ChainCodes, 8 total threads. 148 Launch network, use PTE stress mode to send 10000 invoke transactions 149 concurrently to a peer in each org on all channels on all chaincodes, 150 query the ledger for each to ensure the last transaction was written, 151 calculate tps, remove network and cleanup 152 ''' 153 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 154 self.assertIn(TEST_PASS_STRING, result) 155 156 @unittest.skip("skipping") 157 def test_FAB3816_GossipStress_10_PeersPerOrg(self): 158 ''' 159 Standard Network plus extra peers: 2 Orderers, 3 KafkaBrokers, 3 ZKs, 160 2 Certificate Authorities (CAs - 1 per Org), 2 Organizations, 161 10 Peers per Org, 4 Peers, 2 Channels, 2 ChainCodes, 8 total threads. 162 Launch network, use PTE stress mode to send 10000 invoke transactions 163 concurrently to a peer in each org on all channels on all chaincodes, 164 query the ledger for each to ensure the last transaction was written, 165 calculate tps, remove network and cleanup 166 ''' 167 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 168 self.assertIn(TEST_PASS_STRING, result) 169