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

◆ __init__()

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 140 of file edmStreamStallGrapher.py.

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 

References createfilelist.int, and submitPVValidationJobs.split().

Member Function Documentation

◆ processingSteps()

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.

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)
175  return processingStepsFromStallMonitorOutput(self._f,self._moduleNames)
176 
177 #----------------------------------------------
178 # Utility to get time out of Tracer output text format

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

Member Data Documentation

◆ _f

edmStreamStallGrapher.StallMonitorParser._f
private

◆ _moduleNames

edmStreamStallGrapher.StallMonitorParser._moduleNames
private

◆ maxNameSize

edmStreamStallGrapher.StallMonitorParser.maxNameSize

Definition at line 165 of file edmStreamStallGrapher.py.

◆ numStreams

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 163 of file edmStreamStallGrapher.py.

submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
createfilelist.int
int
Definition: createfilelist.py:10
edmStreamStallGrapher.processingStepsFromStallMonitorOutput
def processingStepsFromStallMonitorOutput(f, moduleNames)
Definition: edmStreamStallGrapher.py:72