stats.py (1308:2078b53d65d9) | stats.py (1309:7daf185ddae8) |
---|---|
1#!/usr/bin/env python 2from __future__ import division 3import re, sys 4 5def usage(): 6 print '''\ 7Usage: %s [-E] [-F] [-d <db> ] [-g <get> ] [-h <host>] [-p] 8 [-s <system>] [-r <runs> ] [-u <username>] <command> [command args] --- 235 unchanged lines hidden (view full) --- 244 if len(args): 245 raise CommandException 246 for o,a in opts: 247 if o == '-u': 248 user = a 249 info.source.listRuns(user) 250 return 251 | 1#!/usr/bin/env python 2from __future__ import division 3import re, sys 4 5def usage(): 6 print '''\ 7Usage: %s [-E] [-F] [-d <db> ] [-g <get> ] [-h <host>] [-p] 8 [-s <system>] [-r <runs> ] [-u <username>] <command> [command args] --- 235 unchanged lines hidden (view full) --- 244 if len(args): 245 raise CommandException 246 for o,a in opts: 247 if o == '-u': 248 user = a 249 info.source.listRuns(user) 250 return 251 |
252 if command == 'stability': 253 stats = info.source.getStat(args[0]) 254 info.source.get = "avg" 255 256 #loop through all the stats selected 257 for stat in stats: 258 avg = float(stat) 259 260 #loop through all the selected runs 261 for run in runs: 262 info.display_run = run.run; 263 #print run.name 264 #print avg 265 runTicks = info.source.retTicks([ run ]) 266 #throw away the first one, it's 0 267 runTicks.pop(0) 268 269 #loop through all the various ticks for each run 270 for tick in runTicks: 271 stat.ticks = str(tick) 272 val = float(stat) 273 if (val < (avg * .9)) or (val > (avg * 1.1)): 274 print '%s:%s is %f, which is more than 10%% of the'\ 275 'mean %f' % (run.name, stat.name, stat, avg) 276 277 278 279 280 return 281 282 |
|
252 if command == 'stats': 253 if len(args) == 0: 254 info.source.listStats() 255 elif len(args) == 1: 256 info.source.listStats(args[0]) 257 else: 258 raise CommandException 259 --- 433 unchanged lines hidden --- | 283 if command == 'stats': 284 if len(args) == 0: 285 info.source.listStats() 286 elif len(args) == 1: 287 info.source.listStats(args[0]) 288 else: 289 raise CommandException 290 --- 433 unchanged lines hidden --- |