summaryrefslogtreecommitdiff
path: root/util/stats/info.py
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-11-18 16:23:29 -0500
committerNathan Binkert <binkertn@umich.edu>2004-11-18 16:23:29 -0500
commitab10712341f610cb528d23fa7208203da5f7d294 (patch)
tree074cc7040bedb0dd8da33826e670186f2ffa1cd8 /util/stats/info.py
parentceec8419807fe05a0b298e6af64d4dc4cf3df229 (diff)
downloadgem5-ab10712341f610cb528d23fa7208203da5f7d294.tar.xz
stats python fixes for dealing with vectors better. graph tweaking
ipkb stat and formulas from the command line. util/stats/info.py: no need to raise an attribute error if two values aren't found in the exact same set of runs. Would be good to check that each run is the same though. util/stats/stats.py: more graph tweaking command to execute a formula from the command line. add interrupts per kilobyte of data --HG-- extra : convert_revision : 78d6b14d340d08edcbc69e4c1c5a4c1dd9bb10dd
Diffstat (limited to 'util/stats/info.py')
-rw-r--r--util/stats/info.py44
1 files changed, 21 insertions, 23 deletions
diff --git a/util/stats/info.py b/util/stats/info.py
index 15a4a7d73..fa318a650 100644
--- a/util/stats/info.py
+++ b/util/stats/info.py
@@ -47,28 +47,21 @@ def wrapop(op, lv, rv):
return op(lv, rv)
-def same(lv, rv):
- for lrun,rrun in zip(lv.keys(),rv.keys()):
- if lrun != rrun:
- print 'lrun != rrun'
- print lrun, rrun
- print lv.keys()
- print rv.keys()
+def same(lrun, rrun):
+ for lx,rx in zip(lrun.keys(),rrun.keys()):
+ if lx != rx:
+ print 'lx != rx'
+ print lx, rx
+ print lrun.keys()
+ print rrun.keys()
return False
- for lx,rx in zip(lv[lrun].keys(),rv[rrun].keys()):
- if lx != rx:
- print 'lx != rx'
- print lx, rx
- print lv[lrun].keys()
- print rv[rrun].keys()
+ for ly,ry in zip(lrun[lx].keys(),rrun[rx].keys()):
+ if ly != ry:
+ print 'ly != ry'
+ print ly, ry
+ print lrun[lx].keys()
+ print rrun[rx].keys()
return False
- for ly,ry in zip(lv[lrun][lx].keys(),rv[rrun][rx].keys()):
- if ly != ry:
- print 'ly != ry'
- print ly, ry
- print lv[lrun][lx].keys()
- print rv[rrun][rx].keys()
- return False
return True
@@ -79,10 +72,15 @@ def binaryop(op, lf, rf):
lv = lf.value
rv = rf.value
- if not same(lv, rv):
- raise AttributeError, "run,x,y not identical"
+ theruns = []
+ for r in lv.keys():
+ if rv.has_key(r):
+ if same(lv[r], rv[r]):
+ theruns.append(r)
+ else:
+ raise AttributeError
- for run in lv.keys():
+ for run in theruns:
result[run] = {}
for x in lv[run].keys():
result[run][x] = {}