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

 _esModuleNames
 
 _f
 
 _moduleNames
 

Detailed Description

Definition at line 153 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

◆ __init__()

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 154 of file edmStreamStallGrapher.py.

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

154  def __init__(self,f):
155  numStreams = 0
156  numStreamsFromSource = 0
157  moduleNames = {}
158  esModuleNames = {}
159  frameworkTransitions = False
160  for rawl in f:
161  l = rawl.strip()
162  if l and l[0] == 'M':
163  i = l.split(' ')
164  if i[3] == '4':
165  #found global begin run
166  numStreams = int(i[1])+1
167  break
168  if numStreams == 0 and l and l[0] == 'S':
169  s = int(l.split(' ')[1])
170  if s > numStreamsFromSource:
171  numStreamsFromSource = s
172  if len(l) > 5 and l[0:2] == "#M":
173  (id,name)=tuple(l[2:].split())
174  moduleNames[id] = name
175  continue
176  if len(l) > 5 and l[0:2] == "#N":
177  (id,name)=tuple(l[2:].split())
178  esModuleNames[id] = name
179  continue
180  if len(l) > 40 and l[0:24] == "# preFrameworkTransition":
181  frameworkTransitions = True
182 
183  self._f = f
184  if numStreams == 0:
185  numStreams = numStreamsFromSource +2
186  self.numStreams =numStreams
187  self._moduleNames = moduleNames
188  self._esModuleNames = esModuleNames
189  self.maxNameSize =0
190  for n in moduleNames.items():
191  self.maxNameSize = max(self.maxNameSize,len(n))
192  for n in esModuleNames.items():
193  self.maxNameSize = max(self.maxNameSize,len(n))
194  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
195  if frameworkTransitions:
196  self.maxNameSize = max(self.maxNameSize, len('streamBeginLumi'))
197 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

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

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

198  def processingSteps(self):
199  """Create a generator which can step through the file and return each processing step.
200  Using a generator reduces the memory overhead when parsing a large file.
201  """
202  self._f.seek(0)
203  return processingStepsFromStallMonitorOutput(self._f,self._moduleNames, self._esModuleNames)
204 
205 #----------------------------------------------
206 # Utility to get time out of Tracer output text format
def processingStepsFromStallMonitorOutput(f, moduleNames, esModuleNames)

Member Data Documentation

◆ _esModuleNames

edmStreamStallGrapher.StallMonitorParser._esModuleNames
private

◆ _f

edmStreamStallGrapher.StallMonitorParser._f
private

◆ _moduleNames

edmStreamStallGrapher.StallMonitorParser._moduleNames
private

◆ maxNameSize

edmStreamStallGrapher.StallMonitorParser.maxNameSize

Definition at line 189 of file edmStreamStallGrapher.py.

◆ numStreams

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 186 of file edmStreamStallGrapher.py.