File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -841,13 +841,17 @@ def peak_action():
841841such file in the current directory."""
842842 parser = ArgumentParser (usage = "mprof peak [options] [file.dat]" , description = desc )
843843 parser .add_argument ("profiles" , nargs = "*" ,
844- help = "profiles made by mprof run" )
844+ help = "profiles made by mprof run" )
845845 args = parser .parse_args ()
846846 filenames = get_profiles (args )
847847
848848 for filename in filenames :
849849 prof = read_mprofile_file (filename )
850850 print ("{}\t {:.3f} MiB" .format (prof ["filename" ], max (prof ["mem_usage" ])))
851+ for child , values in prof ["children" ].items ():
852+ child_peak = max ([ mem_ts [0 ] for mem_ts in values ])
853+ print (" Child {}\t \t \t {:.3f} MiB" .format (child , child_peak ))
854+
851855
852856def get_profiles (args ):
853857 profiles = glob .glob ("mprofile_??????????????.dat" )
You can’t perform that action at this time.
0 commit comments