9 pprof --text `which python` my.athena.profile > GProfile.txt
11 pprof --callgrind `which python` my.athena.profile > callgrind.out.GProfile
17 separate into different files for the classes
18 allow for some options (argparse)
20 extend list of timers to be added to the list.
27 if __name__==
"__main__":
31 usage=
"parses callgrind.out and creates web pages, and fills database with performance info"
33 parser = argparse.ArgumentParser(description=usage)
37 parser.add_argument(
'-p',
'--path', action=
'store', dest=
'librarypathbase', default=librarypathbase,
38 help=
'Location of the base path for the libraries')
40 dbfile=
'/afs/cern.ch/atlas/groups/Simulation/rtt/rttProfile.sqlite'
41 parser.add_argument(
'--dbfile', action=
'store', dest=
'dbfile',
43 help=
'location of the sqlite file ('+dbfile+
')')
44 args = parser.parse_args()
48 p = subprocess.Popen([
'./libscrape.sh', infile], stdout=subprocess.PIPE,
49 stderr=subprocess.STDOUT)
52 line = p.stdout.readline()
54 if(retcode
is not None):
57 return s[:-1]
if s.endswith(
'\n')
else s
60 for infile
in glob.glob( os.path.join(args.librarypathbase,
'lib*.so') ):
62 result = re.search(
'lib\/lib(.*).so', infile)
63 packagename = result.group(1)
66 if not line.startswith(
'GaudiDll'):
68 dd+= [(line,packagename)]