9 parser = opt.OptionParser()
10 parser.add_option_group(devel)
11 (options, args) = parser.parse_args()
13 if not len(args) == 1:
14 parser.error(
"you must only pass one file as an argument")
17 datafile = os.path.abspath(args[0])
18 if not os.path.isfile(datafile):
19 parser.error(
"%s file does not exist" % datafile)
45 list = pickle.load(ph)
47 for host, data
in list:
49 for options, cpudata
in data:
50 for cpukey
in cpudata:
53 cpustr =
"cpu: " +
str(options[
"cpus"][0])
55 cpustr =
"cpu: " +
str(cpukey)
56 candledata = cpudata[cpukey]
57 for candlekey
in candledata:
58 profsetdata = candledata[candlekey]
59 for profsetkey
in profsetdata:
60 profiledata = profsetdata[profsetkey]
61 for profilekey
in profiledata:
62 stepdata = profiledata[profilekey]
63 for stepkey
in stepdata:
64 print "Host: " +
str(host)
65 print "Options: " +
str(options)
67 print "candle: " +
str(candlekey)
68 print "profsetdata: " +
str(profsetkey)
69 print "profiler: " +
str(profilekey)
70 print "step: " +
str(stepkey)
71 for evtdat
in stepdata[stepkey]:
73 except TypeError
as detail:
74 print "Data: does not exist for this machine, the server failed to return a valid data structure" 78 if __name__ ==
"__main__":
def optionParse()
Parses name of datafile from the arguments.
def printBenchmarkData(afile)
(this could be cleaned up a little bit) Format of the data file should be: