CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
cmsPerfSuite.PerfSuiteTimer Class Reference

Public Member Functions

def __init__
 
def get_duration
 
def get_end
 
def get_start
 
def set_end
 
def set_start
 

Public Attributes

 duration
 
 duration_hours
 
 duration_minutes
 
 duration_seconds
 
 end
 
 start
 

Detailed Description

A class defining timing objects to time the running of the various parts of the performance suite. The class depends on module datetime.

Definition at line 31 of file cmsPerfSuite.py.

Constructor & Destructor Documentation

def cmsPerfSuite.PerfSuiteTimer.__init__ (   self,
  start = None 
)
Initialize the start time and set the end time to some indefinite time in the future

Definition at line 33 of file cmsPerfSuite.py.

33 
34  def __init__(self,start=None):
35  """Initialize the start time and set the end time to some indefinite time in the future"""
36  self.start = start
37  self.end = datetime.datetime.max
38  self.duration = self.start - self.end

Member Function Documentation

def cmsPerfSuite.PerfSuiteTimer.get_duration (   self)
Return the duration between start and end as a dictionary with keys 'hours', 'minutes', 'seconds' to express the total duration in the favourite (most appropriate) unit. The function returns truncated integers.

Definition at line 53 of file cmsPerfSuite.py.

53 
54  def get_duration(self):
55  """Return the duration between start and end as a dictionary with keys 'hours', 'minutes', 'seconds' to express the total duration in the favourite (most appropriate) unit. The function returns truncated integers."""
56  self.duration_seconds = self.duration.days*86400 + self.duration.seconds
58  self.duration_hours = self.duration_seconds/3600
59  return {'hours':self.duration_hours, 'minutes':self.duration_minutes, 'seconds':self.duration_seconds}
def cmsPerfSuite.PerfSuiteTimer.get_end (   self)
Return the end time in ctime timestamp format

Definition at line 50 of file cmsPerfSuite.py.

50 
51  def get_end(self):
52  """Return the end time in ctime timestamp format"""
return self.end.ctime()
def cmsPerfSuite.PerfSuiteTimer.get_start (   self)
Return the start time in ctime timestamp format

Definition at line 47 of file cmsPerfSuite.py.

47 
48  def get_start(self):
49  """Return the start time in ctime timestamp format"""
return self.start.ctime()
def cmsPerfSuite.PerfSuiteTimer.set_end (   self,
  end = None 
)

Definition at line 42 of file cmsPerfSuite.py.

References cmsPerfSuite.PerfSuiteTimer.duration, Counter.end, cmsPerfSuite.PerfSuiteTimer.end, CombinedSVComputer::IterationRange.end, CombinedSVComputerV2::IterationRange.end, CombinedSVSoftLeptonComputer::IterationRange.end, poly< T >::const_iterator.end, edm::IDVectorMap< ID, C, P >::range.end, PhysicsTools::BitSet::Iterator.end, SCSubClusterMatchesToElement.end, svgfig.LineAxis.end, cmsPerfSuite.PerfSuiteTimer.start, StripCompactDigiSimLinks::TrackRecord.start, SiStripMonitorCluster::ClusterProperties.start, PhysicsTools::VarProcessor::ValueIterator.start, and svgfig.LineAxis.start.

42 
43  def set_end(self,end=None):
44  #print "Setting end time to %s"%end.ctime()
45  self.end = end
self.duration = self.end - self.start
def cmsPerfSuite.PerfSuiteTimer.set_start (   self,
  start = None 
)

Definition at line 40 of file cmsPerfSuite.py.

References cmsPerfSuite.PerfSuiteTimer.start, StripCompactDigiSimLinks::TrackRecord.start, SiStripMonitorCluster::ClusterProperties.start, PhysicsTools::VarProcessor::ValueIterator.start, and svgfig.LineAxis.start.

40 
41  def set_start(self,start=None):
self.start = start

Member Data Documentation

cmsPerfSuite.PerfSuiteTimer.duration

Definition at line 37 of file cmsPerfSuite.py.

Referenced by cmsPerfSuite.PerfSuiteTimer.set_end().

cmsPerfSuite.PerfSuiteTimer.duration_hours

Definition at line 57 of file cmsPerfSuite.py.

cmsPerfSuite.PerfSuiteTimer.duration_minutes

Definition at line 56 of file cmsPerfSuite.py.

cmsPerfSuite.PerfSuiteTimer.duration_seconds

Definition at line 55 of file cmsPerfSuite.py.

cmsPerfSuite.PerfSuiteTimer.end

Definition at line 36 of file cmsPerfSuite.py.

Referenced by Types.LuminosityBlockRange.cppID(), Types.EventRange.cppID(), and cmsPerfSuite.PerfSuiteTimer.set_end().

cmsPerfSuite.PerfSuiteTimer.start

Definition at line 35 of file cmsPerfSuite.py.

Referenced by progressbar.ProgressBar.__next__(), Types.LuminosityBlockRange.cppID(), Types.EventRange.cppID(), cmsPerfSuite.PerfSuiteTimer.set_end(), and cmsPerfSuite.PerfSuiteTimer.set_start().