Permalink
Browse files

WIP

  • Loading branch information...
kayceesrk committed Sep 18, 2011
1 parent 49d1ced commit 0332e71baa94c781b6d244ff0f853dd2d8611d17
Showing with 21 additions and 2 deletions.
  1. +21 −2 trunk/testing/benchmarks/runBench.py
@@ -3,6 +3,8 @@
import re
import sqlite3
from optparse import OptionParser
+import numpy
+import matplotlib.pyplot as plt
logging=True
@@ -37,6 +39,17 @@ def run (dir, prog, atMLtons, args):
print ("\tCompleted in " + str(time) + " ms")
return time
+def hsizeToInt (s):
+ intVal = int(s.replace('K','').replace('M','').replace('G',''))
+ if s.endswith('K'):
+ intVal *= 1024
+ elif s.endswith('M'):
+ intVal *= 1024*1024
+ elif s.endswith('G'):
+ intVal *= 1024*1024*1024
+ return intVal
+
+
def main():
#Parse options
parser = OptionParser()
@@ -76,8 +89,14 @@ def main():
for b in benchmarks:
for n in [1, 2, 4, 8, 16]:
c.execute ("select maxHeap, result from results where benchmark=? and numProcs=? and resultType=?", (b, n, "runTime"))
- for row in c.fetchall():
- print (row)
+ data = c.fetchall ()
+ x = list (map (lambda v: hsizeToInt (v[0]), data))
+ #Assumes that for a particular benchmark the smallest heap size is the same
+ minX = min(x)
+ x = [v/minX for v in x]
+ y = list (map (lambda v: v[1], data))
+ print (x)
+ print (y)
print ("\n------------------------------------\n")

0 comments on commit 0332e71

Please sign in to comment.