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

◆ __init__()

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 139 of file edmStreamStallGrapher.py.

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 moduleNames.items():
166  self.maxNameSize = max(self.maxNameSize,len(n))
167  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
168 

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

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)
174  return processingStepsFromStallMonitorOutput(self._f,self._moduleNames)
175 
176 #----------------------------------------------
177 # 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 164 of file edmStreamStallGrapher.py.

◆ numStreams

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 162 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:71