Merge zizzer:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/.automount/zazzer/z/rdreslin/m5bk/timing_L1 --HG-- extra : convert_revision : 917c79ebe8f3fb250755464f3b7f45f744f5be09
This commit is contained in:
commit
480db441c7
2 changed files with 40 additions and 8 deletions
|
@ -35,6 +35,19 @@ def defined(key):
|
|||
def define(key, value = True):
|
||||
env[key] = value
|
||||
|
||||
def panic(*args, **kwargs):
|
||||
sys.exit(*args, **kwargs)
|
||||
|
||||
def AddToPath(path):
|
||||
path = os.path.realpath(path)
|
||||
if os.path.isdir(path):
|
||||
sys.path.append(path)
|
||||
|
||||
def Import(path):
|
||||
AddToPath(os.path.dirname(path))
|
||||
exec('from m5config import *')
|
||||
mpy_exec(file(path, 'r'))
|
||||
|
||||
def issequence(value):
|
||||
return isinstance(value, tuple) or isinstance(value, list)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import division
|
||||
import re, sys
|
||||
import re, sys, math
|
||||
|
||||
def usage():
|
||||
print '''\
|
||||
|
@ -255,28 +255,47 @@ def commands(options, command, args):
|
|||
|
||||
#loop through all the stats selected
|
||||
for stat in stats:
|
||||
avg = float(stat)
|
||||
|
||||
print "%s:" % stat.name
|
||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP")
|
||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||
("------------------------------", "------------",
|
||||
"------------", "----", "-----", "-----", "-----")
|
||||
#loop through all the selected runs
|
||||
for run in runs:
|
||||
info.display_run = run.run;
|
||||
#print run.name
|
||||
#print avg
|
||||
runTicks = info.source.retTicks([ run ])
|
||||
#throw away the first one, it's 0
|
||||
runTicks.pop(0)
|
||||
stat.ticks = runTicks
|
||||
avg = float(stat)
|
||||
stdev = 0
|
||||
numoutsideavg = 0
|
||||
numoutside1std = 0
|
||||
numoutside2std = 0
|
||||
|
||||
#loop through all the various ticks for each run
|
||||
for tick in runTicks:
|
||||
stat.ticks = str(tick)
|
||||
val = float(stat)
|
||||
if (val < (avg * .9)) or (val > (avg * 1.1)):
|
||||
print '%s:%s is %f, which is more than 10%% of the'\
|
||||
'mean %f' % (run.name, stat.name, stat, avg)
|
||||
|
||||
|
||||
numoutsideavg += 1
|
||||
stdev += pow((val-avg),2)
|
||||
|
||||
stdev = math.sqrt(stdev / len(runTicks))
|
||||
for tick in runTicks:
|
||||
stat.ticks = str(tick)
|
||||
val = float(stat)
|
||||
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
||||
numoutside1std += 1
|
||||
if (val < (avg - (2*stdev))) or (val > (avg + (2*stdev))):
|
||||
numoutside2std += 1
|
||||
|
||||
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
||||
"%d" % numoutsideavg, "%d" % numoutside1std,
|
||||
"%d" % numoutside2std, "%d" % len(runTicks))
|
||||
return
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue