Changes in / [1afda5a2:d18540f]


Ignore:
Location:
benchmark/convoy
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/convoy/genConvoyStats.py

    r1afda5a2 rd18540f  
    1 #!/usr/bin/env python3
    2 
    31import os
    42import sys
     
    1715parser.add_argument("-o", "--OutputFile", default='', help="File to write output to")
    1816parser.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)
    2017
    2118args = parser.parse_args()
     
    188185    expected.append(expectedConvoy)
    189186
    190     if args.Verbose or args.Single:
     187    if args.Verbose:
    191188        output('Convoying bounds: {:.2f}%-{:.2f}%, Expected convoying: {:.2f}%'.format(lowerBoundConvoy,upperBoundConvoy, expectedConvoy))
    192189
    193190
    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()
     191for 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()
    214204
    215205readFile.close()
Note: See TracChangeset for help on using the changeset viewer.