finished stability stats option
--HG-- extra : convert_revision : 3ad0a143f79b116c5b18321846653d627429882a
This commit is contained in:
parent
c9fa82e25f
commit
24bfd5ef01
1 changed files with 22 additions and 7 deletions
|
@ -255,28 +255,43 @@ def commands(options, command, args):
|
||||||
|
|
||||||
#loop through all the stats selected
|
#loop through all the stats selected
|
||||||
for stat in stats:
|
for stat in stats:
|
||||||
avg = float(stat)
|
|
||||||
|
|
||||||
|
print "%s:" % stat.name
|
||||||
|
print "%-30s %12s %12s %4s %5s %6s" % \
|
||||||
|
("run name", "average", "stdev", ">10%", ">1SDV", "SAMP")
|
||||||
|
print "%-30s %12s %12s %4s %5s %6s" % \
|
||||||
|
("------------------------------", "------------", "------------", "----", "-----", "------")
|
||||||
#loop through all the selected runs
|
#loop through all the selected runs
|
||||||
for run in runs:
|
for run in runs:
|
||||||
info.display_run = run.run;
|
info.display_run = run.run;
|
||||||
#print run.name
|
|
||||||
#print avg
|
|
||||||
runTicks = info.source.retTicks([ run ])
|
runTicks = info.source.retTicks([ run ])
|
||||||
#throw away the first one, it's 0
|
#throw away the first one, it's 0
|
||||||
runTicks.pop(0)
|
runTicks.pop(0)
|
||||||
|
stat.ticks = runTicks
|
||||||
|
avg = float(stat)
|
||||||
|
stdev = 0
|
||||||
|
numoutsideavg = 0
|
||||||
|
|
||||||
#loop through all the various ticks for each run
|
#loop through all the various ticks for each run
|
||||||
for tick in runTicks:
|
for tick in runTicks:
|
||||||
stat.ticks = str(tick)
|
stat.ticks = str(tick)
|
||||||
val = float(stat)
|
val = float(stat)
|
||||||
if (val < (avg * .9)) or (val > (avg * 1.1)):
|
if (val < (avg * .9)) or (val > (avg * 1.1)):
|
||||||
print '%s:%s is %f, which is more than 10%% of the'\
|
numoutsideavg += 1
|
||||||
'mean %f' % (run.name, stat.name, stat, avg)
|
stdev += pow((val-avg),2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
stdev = pow(stdev / len(runTicks), 0.5)
|
||||||
|
numoutsidestd = 0
|
||||||
|
for tick in runTicks:
|
||||||
|
stat.ticks = str(tick)
|
||||||
|
val = float(stat)
|
||||||
|
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
||||||
|
numoutsidestd += 1
|
||||||
|
|
||||||
|
print "%-30s %12s %12s %4s %5s %6s" % \
|
||||||
|
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
||||||
|
"%d" % numoutsideavg, "%d" % numoutsidestd,
|
||||||
|
"%d" % len(runTicks))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue