Changeset 54dd994 for tools/stat.py


Ignore:
Timestamp:
Jun 24, 2019, 10:30:47 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
84917e2
Parents:
3c6e417 (diff), 9e0a360 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/stat.py

    r3c6e417 r54dd994  
    1111                content = f.readlines()
    1212                content = [x.strip() for x in content]
    13                 content = [int(x) for x in content]
    14                 content.remove(max(content))
    15                 content.remove(min(content))
    16                 med = numpy.around( numpy.median(content), decimals=1)
    17                 avg = numpy.around( numpy.mean  (content), decimals=2)
    18                 std = numpy.around( numpy.std   (content), decimals=2)
    19                 print "median {0} avg {1} stddev {2}".format( med, avg, std )
     13                content = [float(x) for x in content]   # expect floating-point strings
     14                content.remove(max(content))            # need at least 4 data values because
     15                content.remove(min(content))            # the max and min values are removed
     16                med = numpy.median(content)
     17                avg = numpy.mean  (content)
     18                std = numpy.std   (content)
     19                print "median {0:.1f} avg {1:.1f} stddev {2:.2f}".format( med, avg, std )
    2020
    2121
Note: See TracChangeset for help on using the changeset viewer.