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 138 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 139 of file edmStreamStallGrapher.py.

References createfilelist.int, and split.

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

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

169  def processingSteps(self):
170  """Create a generator which can step through the file and return each processing step.
171  Using a generator reduces the memory overhead when parsing a large file.
172  """
173  self._f.seek(0)
175 
176 #----------------------------------------------
177 # 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 164 of file edmStreamStallGrapher.py.

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 162 of file edmStreamStallGrapher.py.