Package PyFoam :: Package Applications :: Module CommonReportUsage
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Applications.CommonReportUsage

 1  """ 
 2  Class that implements the common functionality for reporting the usage of a run 
 3  """ 
 4   
5 -class CommonReportUsage(object):
6 """ The class that reports the resource usage 7 """ 8
9 - def addOptions(self):
10 self.ensureGeneralOptions() 11 self.generalOpts.add_option("--report-usage", 12 action="store_true", 13 default=False, 14 dest="reportUsage", 15 help="After the execution the maximum memory usage is printed to the screen")
16
17 - def reportUsage(self,run):
18 if self.opts.reportUsage: 19 print "\n Used Memory: ",run.run.usedMemory(),"MB"
20