diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2005-01-14 17:50:36 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2005-01-14 17:50:36 -0500 |
commit | dfecc891509d318ffaefee95b6c6a1ec83b6f28d (patch) | |
tree | 5e99249c4f387962d276d902de9fde6bf1ab6ee5 /util/stats/stats.py | |
parent | 3e5a3df24f06b22ee1c155f3e3d3948d9140754a (diff) | |
download | gem5-dfecc891509d318ffaefee95b6c6a1ec83b6f28d.tar.xz |
added stats code to check stability
util/stats/db.py:
added working listticks (for printing) and retticks(for using in python) code
util/stats/stats.py:
added stability function that checks if all samples are within 10% of mean.
--HG--
extra : convert_revision : 7eb1714db75e456f248fe7cae73db1c57642947d
Diffstat (limited to 'util/stats/stats.py')
-rwxr-xr-x | util/stats/stats.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/util/stats/stats.py b/util/stats/stats.py index b2b0ff8ad..7f3761a92 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -249,6 +249,37 @@ def commands(options, command, args): info.source.listRuns(user) return + if command == 'stability': + stats = info.source.getStat(args[0]) + info.source.get = "avg" + + #loop through all the stats selected + for stat in stats: + avg = float(stat) + + #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) + + #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) + + + + + return + + if command == 'stats': if len(args) == 0: info.source.listStats() |