ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 1526e86 was
c12869e,
checked in by Peter A. Buhr <pabuhr@…>, 5 years ago
|
update benchmarks for concurrency paper
|
-
Property mode set to
100755
|
File size:
642 bytes
|
Rev | Line | |
---|
[bfd15e8] | 1 | #!/usr/bin/python |
---|
| 2 | |
---|
| 3 | import sys |
---|
| 4 | import numpy |
---|
| 5 | |
---|
| 6 | if len(sys.argv) != 2 : |
---|
| 7 | sys.exit("Expected file name as only argument") |
---|
| 8 | |
---|
| 9 | try: |
---|
| 10 | with open(sys.argv[1]) as f: |
---|
| 11 | content = f.readlines() |
---|
| 12 | content = [x.strip() for x in content] |
---|
[d7f24b2] | 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) |
---|
[c12869e] | 19 | print "median {0:.1f} avg {1:.1f} stddev {2:.1f}".format( med, avg, std ) |
---|
[bfd15e8] | 20 | |
---|
| 21 | |
---|
| 22 | except IOError as e: |
---|
[d7f24b2] | 23 | sys.exit(e.strerror) |
---|
Note: See
TracBrowser
for help on using the repository browser.