@@ -10,30 +10,38 @@ def test_FAB_3790_VaryNumParallelTxPerChain(self):
10
10
with goleveldb as the state database. We vary the number of parallel
11
11
transactions per chain and observe the performance.
12
12
13
- Passing criteria: all subtests (8) completed successfully
13
+ Passing criteria: Underlying LTE test completed successfully with
14
+ exit code 0
14
15
'''
15
- result = subprocess .check_output (
16
+ logfile = open ("output_VaryNumParallelTxPerChain.log" , "w" )
17
+ returncode = subprocess .call (
16
18
"./runbenchmarks.sh varyNumParallelTxPerChain" ,
17
- shell = True , stderr = subprocess .STDOUT ,
19
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
18
20
cwd = '../../tools/LTE/scripts' )
19
- completion_count = result .count ("PASS" )
20
- self .assertEqual (completion_count , 8 )
21
+ logfile .close ()
22
+ self .assertEqual (returncode , 0 , msg = "VaryNumParallelTxPerChain "
23
+ "performance test failed. \n Please check the logfile "
24
+ + logfile .name + " for more details." )
21
25
22
- def test_FAB_3795_VaryNumChain (self ):
26
+ def test_FAB_3795_VaryNumChains (self ):
23
27
'''
24
28
In this Performance test, we observe the performance (time to
25
29
complete a set number of Ledger operations) of the Ledger component,
26
30
with goleveldb as the state database. We vary the number of chains
27
31
(ledgers).
28
32
29
- Passing criteria: all subtests (8) completed successfully
33
+ Passing criteria: Underlying LTE test completed successfully with
34
+ exit code 0
30
35
'''
31
- result = subprocess .check_output (
32
- "./runbenchmarks.sh varyNumChain" ,
33
- shell = True , stderr = subprocess .STDOUT ,
36
+ logfile = open ("output_VaryNumChains.log" , "w" )
37
+ returncode = subprocess .call (
38
+ "./runbenchmarks.sh varyNumChains" ,
39
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
34
40
cwd = '../../tools/LTE/scripts' )
35
- completion_count = result .count ("PASS" )
36
- self .assertEqual (completion_count , 8 )
41
+ logfile .close ()
42
+ self .assertEqual (returncode , 0 , msg = "VaryNumChains performance test"
43
+ " failed. \n Please check the logfile " + logfile .name + " for more "
44
+ "details." )
37
45
38
46
def test_FAB_3798_VaryNumParallelTxWithSingleChain (self ):
39
47
'''
@@ -42,45 +50,57 @@ def test_FAB_3798_VaryNumParallelTxWithSingleChain(self):
42
50
with goleveldb as the state database. We vary the number of parallel
43
51
transactions on a single chain.
44
52
45
- Passing criteria: all subtests (8) completed successfully
53
+ Passing criteria: Underlying LTE test completed successfully with
54
+ exit code 0
46
55
'''
47
- result = subprocess .check_output (
56
+ logfile = open ("output_VaryNumParallelTxWithSingleChain.log" , "w" )
57
+ returncode = subprocess .call (
48
58
"./runbenchmarks.sh varyNumParallelTxWithSingleChain" ,
49
- shell = True , stderr = subprocess .STDOUT ,
59
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
50
60
cwd = '../../tools/LTE/scripts' )
51
- completion_count = result .count ("PASS" )
52
- self .assertEqual (completion_count , 8 )
61
+ logfile .close ()
62
+ self .assertEqual (returncode , 0 , msg = "VaryNumParallelTxWithSingleChain "
63
+ "performance test failed. \n Please check the logfile "
64
+ + logfile .name + " for more details." )
53
65
54
- def test_FAB_3799_VaryNumChainWithNoParallelism (self ):
66
+ def test_FAB_3799_VaryNumChainsWithNoParallelism (self ):
55
67
'''
56
68
In this Performance test, we observe the performance (time to
57
69
complete a set number of Ledger operations) of the Ledger component,
58
70
with goleveldb as the state database. We vary the number of chains
59
71
without any parallelism within a single chain.
60
72
61
- Passing criteria: all subtests (8) completed successfully
73
+ Passing criteria: Underlying LTE test completed successfully with
74
+ exit code 0
62
75
'''
63
- result = subprocess .check_output (
64
- "./runbenchmarks.sh varyNumChainWithNoParallelism" ,
65
- shell = True , stderr = subprocess .STDOUT ,
76
+ logfile = open ("output_VaryNumChainsWithNoParallelism.log" , "w" )
77
+ returncode = subprocess .call (
78
+ "./runbenchmarks.sh varyNumChainsWithNoParallelism" ,
79
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
66
80
cwd = '../../tools/LTE/scripts' )
67
- completion_count = result .count ("PASS" )
68
- self .assertEqual (completion_count , 8 )
81
+ logfile .close ()
82
+ self .assertEqual (returncode , 0 , msg = "varyNumChainsWithNoParallelism "
83
+ "performance test failed. \n Please check the logfile "
84
+ + logfile .name + " for more details." )
69
85
70
86
def test_FAB_3801_VaryKVSize (self ):
71
87
'''
72
88
In this Performance test, we observe the performance (time to
73
89
complete a set number of Ledger operations) of the Ledger component,
74
90
with goleveldb as the state database. We vary the size of key-value.
75
91
76
- Passing criteria: all subtests (5) completed successfully
92
+ Passing criteria: Underlying LTE test completed successfully with
93
+ exit code 0
77
94
'''
78
- result = subprocess .check_output (
95
+ logfile = open ("output_VaryKVSize.log" , "w" )
96
+ returncode = subprocess .call (
79
97
"./runbenchmarks.sh varyKVSize" ,
80
- shell = True , stderr = subprocess .STDOUT ,
98
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
81
99
cwd = '../../tools/LTE/scripts' )
82
- completion_count = result .count ("PASS" )
83
- self .assertEqual (completion_count , 5 )
100
+ logfile .close ()
101
+ self .assertEqual (returncode , 0 , msg = "varyKVSize performance test"
102
+ " failed. \n Please check the logfile " + logfile .name + " for more "
103
+ "details." )
84
104
85
105
def test_FAB_3802_VaryBatchSize (self ):
86
106
'''
@@ -89,30 +109,38 @@ def test_FAB_3802_VaryBatchSize(self):
89
109
with goleveldb as the state database. We vary the value of the batch
90
110
size
91
111
92
- Passing criteria: all subtests (4) completed successfully
112
+ Passing criteria: Underlying LTE test completed successfully with
113
+ exit code 0
93
114
'''
94
- result = subprocess .check_output (
115
+ logfile = open ("output_VaryBatchSize.log" , "w" )
116
+ returncode = subprocess .call (
95
117
"./runbenchmarks.sh varyBatchSize" ,
96
- shell = True , stderr = subprocess .STDOUT ,
118
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
97
119
cwd = '../../tools/LTE/scripts' )
98
- completion_count = result .count ("PASS" )
99
- self .assertEqual (completion_count , 4 )
120
+ logfile .close ()
121
+ self .assertEqual (returncode , 0 , msg = "varyBatchSize performance test"
122
+ " failed. \n Please check the logfile " + logfile .name + " for more "
123
+ "details." )
100
124
101
- def test_FAB_3800_VaryNumKeysInEachTX (self ):
125
+ def test_FAB_3800_VaryNumKeysInEachTx (self ):
102
126
'''
103
127
In this Performance test, we observe the performance (time to
104
128
complete a set number of Ledger operations) of the Ledger component,
105
129
with goleveldb as the state database. We vary the number of keys in
106
130
each transaction.
107
131
108
- Passing criteria: all subtests (5) completed successfully
132
+ Passing criteria: Underlying LTE test completed successfully with
133
+ exit code 0
109
134
'''
110
- result = subprocess .check_output (
111
- "./runbenchmarks.sh varyNumKeysInEachTX" ,
112
- shell = True , stderr = subprocess .STDOUT ,
135
+ logfile = open ("output_VaryNumKeysInEachTx.log" , "w" )
136
+ returncode = subprocess .call (
137
+ "./runbenchmarks.sh varyNumKeysInEachTx" ,
138
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
113
139
cwd = '../../tools/LTE/scripts' )
114
- completion_count = result .count ("PASS" )
115
- self .assertEqual (completion_count , 5 )
140
+ logfile .close ()
141
+ self .assertEqual (returncode , 0 , msg = "varyNumKeysInEachTx performance "
142
+ "test failed. \n Please check the logfile " + logfile .name
143
+ + " for more details." )
116
144
117
145
def test_FAB_3803_VaryNumTxs (self ):
118
146
'''
@@ -121,14 +149,18 @@ def test_FAB_3803_VaryNumTxs(self):
121
149
with goleveldb as the state database. We vary the number of
122
150
transactions carried out.
123
151
124
- Passing criteria: all subtests (4) completed successfully
152
+ Passing criteria: Underlying LTE test completed successfully with
153
+ exit code 0
125
154
'''
126
- result = subprocess .check_output (
155
+ logfile = open ("output_VaryNumTxs.log" , "w" )
156
+ returncode = subprocess .call (
127
157
"./runbenchmarks.sh varyNumTxs" ,
128
- shell = True , stderr = subprocess .STDOUT ,
158
+ shell = True , stderr = subprocess .STDOUT , stdout = logfile ,
129
159
cwd = '../../tools/LTE/scripts' )
130
- completion_count = result .count ("PASS" )
131
- self .assertEqual (completion_count , 4 )
160
+ logfile .close ()
161
+ self .assertEqual (returncode , 0 , msg = "varyNumTxs performance test"
162
+ " failed. \n Please check the logfile " + logfile .name + " for more "
163
+ "details." )
132
164
133
165
134
166
class perf_couchdb (unittest .TestCase ):
0 commit comments