CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
edmStreamStallGrapher.StallMonitorParser Class Reference
Inheritance diagram for edmStreamStallGrapher.StallMonitorParser:

Public Member Functions

def __init__ (self, f)
 
def processingSteps (self)
 

Public Attributes

 maxNameSize
 
 numStreams
 

Private Attributes

 _f
 
 _moduleNames
 

Detailed Description

Definition at line 140 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 141 of file edmStreamStallGrapher.py.

References createfilelist.int, and split.

141  def __init__(self,f):
142  numStreams = 0
143  numStreamsFromSource = 0
144  moduleNames = {}
145  for rawl in f:
146  l = rawl.strip()
147  if l and l[0] == 'M':
148  i = l.split(' ')
149  if i[3] == '4':
150  #found global begin run
151  numStreams = int(i[1])+1
152  break
153  if numStreams == 0 and l and l[0] == 'S':
154  s = int(l.split(' ')[1])
155  if s > numStreamsFromSource:
156  numStreamsFromSource = s
157  if len(l) > 5 and l[0:2] == "#M":
158  (id,name)=tuple(l[2:].split())
159  moduleNames[id] = name
160  continue
161  self._f = f
162  if numStreams == 0:
163  numStreams = numStreamsFromSource +1
164  self.numStreams =numStreams
165  self._moduleNames = moduleNames
166  self.maxNameSize =0
167  for n in six.iteritems(moduleNames):
168  self.maxNameSize = max(self.maxNameSize,len(n))
169  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
170 
double split
Definition: MVATrainer.cc:139

Member Function Documentation

def edmStreamStallGrapher.StallMonitorParser.processingSteps (   self)
Create a generator which can step through the file and return each processing step.
Using a generator reduces the memory overhead when parsing a large file.

Definition at line 171 of file edmStreamStallGrapher.py.

References edmStreamStallGrapher.StallMonitorParser._f, edmStreamStallGrapher.StallMonitorParser._moduleNames, and edmStreamStallGrapher.processingStepsFromStallMonitorOutput().

171  def processingSteps(self):
172  """Create a generator which can step through the file and return each processing step.
173  Using a generator reduces the memory overhead when parsing a large file.
174  """
175  self._f.seek(0)
177 
178 #----------------------------------------------
179 # Utility to get time out of Tracer output text format
def processingStepsFromStallMonitorOutput(f, moduleNames)

Member Data Documentation

edmStreamStallGrapher.StallMonitorParser._f
private
edmStreamStallGrapher.StallMonitorParser._moduleNames
private
edmStreamStallGrapher.StallMonitorParser.maxNameSize

Definition at line 166 of file edmStreamStallGrapher.py.

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 164 of file edmStreamStallGrapher.py.