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

Constructor & Destructor Documentation

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 140 of file edmStreamStallGrapher.py.

References createfilelist.int, and split.

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

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

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

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 163 of file edmStreamStallGrapher.py.