![]() |
![]() |
Functions | |
def | optionParse |
def | printBenchmarkData |
Variables | |
tuple | datafile = optionParse() |
def cmsBenchmarkReader::optionParse | ( | ) |
Definition at line 8 of file cmsBenchmarkReader.py.
00008 : 00009 parser = opt.OptionParser() 00010 parser.add_option_group(devel) 00011 (options, args) = parser.parse_args() 00012 00013 if not len(args) == 1: 00014 parser.error("you must only pass one file as an argument") 00015 sys.exit() 00016 00017 datafile = os.path.abspath(args[0]) 00018 if not os.path.isfile(datafile): 00019 parser.error("%s file does not exist" % datafile) 00020 sys.exit() 00021 00022 return datafile 00023 ########################################
def cmsBenchmarkReader::printBenchmarkData | ( | afile | ) |
Definition at line 43 of file cmsBenchmarkReader.py.
00043 : 00044 ph = open(afile,"rb") 00045 list = pickle.load(ph) 00046 ph.close() 00047 for host, data in list: 00048 try: 00049 for options, cpudata in data: 00050 for cpukey in cpudata: 00051 cpustr = "" 00052 if cpukey == "None": 00053 cpustr = "cpu: " + str(options["cpus"][0]) 00054 else: 00055 cpustr = "cpu: " + str(cpukey) 00056 candledata = cpudata[cpukey] 00057 for candlekey in candledata: 00058 profsetdata = candledata[candlekey] 00059 for profsetkey in profsetdata: 00060 profiledata = profsetdata[profsetkey] 00061 for profilekey in profiledata: 00062 stepdata = profiledata[profilekey] 00063 for stepkey in stepdata: 00064 print "Host: " + str(host) 00065 print "Options: " + str(options) 00066 print cpustr 00067 print "candle: " + str(candlekey) 00068 print "profsetdata: " + str(profsetkey) 00069 print "profiler: " + str(profilekey) 00070 print "step: " + str(stepkey) 00071 for evtdat in stepdata[stepkey]: 00072 print evtdat 00073 except TypeError, detail: 00074 print "Data: does not exist for this machine, the server failed to return a valid data structure" 00075 print detail 00076 00077 if __name__ == "__main__":
tuple cmsBenchmarkReader::datafile = optionParse() [static] |
Definition at line 79 of file cmsBenchmarkReader.py.