Changes in / [1afda5a2:d18540f]
- Location:
- benchmark/convoy
- Files:
-
- 1 deleted
- 1 edited
-
data/single_16_thd (deleted)
-
genConvoyStats.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/convoy/genConvoyStats.py
r1afda5a2 rd18540f 1 #!/usr/bin/env python32 3 1 import os 4 2 import sys … … 17 15 parser.add_argument("-o", "--OutputFile", default='', help="File to write output to") 18 16 parser.add_argument("-v", "--Verbose", help="Verbose output. Will print per run stats alongside aggregates", action='count', default=0) 19 parser.add_argument("-s", "--Single", help="Indicates that input only contains a single run. Assumes the number of threads is the value passed to -m", action='count', default=0)20 17 21 18 args = parser.parse_args() … … 188 185 expected.append(expectedConvoy) 189 186 190 if args.Verbose or args.Single:187 if args.Verbose: 191 188 output('Convoying bounds: {:.2f}%-{:.2f}%, Expected convoying: {:.2f}%'.format(lowerBoundConvoy,upperBoundConvoy, expectedConvoy)) 192 189 193 190 194 if args.Single: 195 output("N: " + str(args.MaxThreads)) 196 goToLineByStartingChars(str(args.MaxThreads)+' ') 197 readInMatrix(int(args.MaxThreads)) 198 analyzeRun() 199 reset() 200 else: 201 for i in range(args.MaxThreads): 202 output("N: " + str(i+1)) 203 204 goToLineByStartingChars(str(i+1)+' ') 205 for j in range(args.RunsPerNumThds): 206 readInMatrix(i+1) 207 analyzeRun() 208 reset() 209 210 output('Mean convoying bounds: {:.2f}%-{:.2f}%, Mean expected convoying: {:.2f}%'.format(st.mean(minBound), st.mean(maxBound),st.mean(expected))) 211 output('Median convoying bounds: {:.2f}%-{:.2f}%, Median expected convoying: {:.2f}%'.format(st.median(minBound), st.median(maxBound),st.median(expected))) 212 output('') 213 thdReset() 191 for i in range(args.MaxThreads): 192 output("N: " + str(i+1)) 193 194 goToLineByStartingChars(str(i+1)+' ') 195 for j in range(args.RunsPerNumThds): 196 readInMatrix(i+1) 197 analyzeRun() 198 reset() 199 200 output('Mean convoying bounds: {:.2f}%-{:.2f}%, Mean expected convoying: {:.2f}%'.format(st.mean(minBound), st.mean(maxBound),st.mean(expected))) 201 output('Median convoying bounds: {:.2f}%-{:.2f}%, Median expected convoying: {:.2f}%'.format(st.median(minBound), st.median(maxBound),st.median(expected))) 202 output('') 203 thdReset() 214 204 215 205 readFile.close()
Note:
See TracChangeset
for help on using the changeset viewer.