CMS 3D CMS Logo

Classes | Functions | Variables
edmTracerCompactLogViewer Namespace Reference

Classes

class  EDModuleTransitionParser
 
class  ESModuleTransitionParser
 
class  FrameworkTransitionParser
 
class  Phase
 
class  PostEDModuleAcquireParser
 
class  PostEDModuleEventDelayedGetParser
 
class  PostEDModulePrefetchingParser
 
class  PostEDModuleTransitionParser
 
class  PostESModuleAcquireParser
 
class  PostESModulePrefetchingParser
 
class  PostESModuleTransitionParser
 
class  PostEventReadFromSourceParser
 
class  PostFrameworkTransitionParser
 
class  PostSourceTransitionParser
 
class  PreEDModuleAcquireParser
 
class  PreEDModuleEventDelayedGetParser
 
class  PreEDModulePrefetchingParser
 
class  PreEDModuleTransitionParser
 
class  PreESModuleAcquireParser
 
class  PreESModulePrefetchingParser
 
class  PreESModuleTransitionParser
 
class  PreEventReadFromSourceParser
 
class  PreFrameworkTransitionParser
 
class  PreSourceTransitionParser
 
class  QueuingFrameworkTransitionParser
 
class  SourceTransitionParser
 
class  TracerCompactFileParser
 

Functions

def lineParserFactory (step, payload, moduleNames, esModuleNames, recordNames, frameworkOnly)
 
def printHelp ()
 
def processingStepsFromFile (f, moduleNames, esModuleNames, recordNames, frameworkOnly)
 
def textOutput (parser)
 
def textPrefix_ (time, indentLevel)
 
def transitionIndentLevel (transition)
 
def transitionName (transition)
 

Variables

 action
 
 args
 
 description
 
 epilog
 
 formatter_class
 
 help
 
 kSourceDelayedRead
 
 kSourceFindEvent
 
 parser
 
 type
 

Function Documentation

◆ lineParserFactory()

def edmTracerCompactLogViewer.lineParserFactory (   step,
  payload,
  moduleNames,
  esModuleNames,
  recordNames,
  frameworkOnly 
)

Definition at line 407 of file edmTracerCompactLogViewer.py.

Referenced by processingStepsFromFile().

407 def lineParserFactory (step, payload, moduleNames, esModuleNames, recordNames, frameworkOnly):
408  if step == 'F':
409  parser = PreFrameworkTransitionParser(payload)
410  if parser.transition == Phase.esSyncEnqueue:
411  return QueuingFrameworkTransitionParser(payload)
412  return parser
413  if step == 'f':
414  return PostFrameworkTransitionParser(payload)
415  if step == 'S':
416  return PreSourceTransitionParser(payload)
417  if step == 's':
418  return PostSourceTransitionParser(payload)
419  if frameworkOnly:
420  return None
421  if step == 'M':
422  return PreEDModuleTransitionParser(payload, moduleNames)
423  if step == 'm':
424  return PostEDModuleTransitionParser(payload, moduleNames)
425  if step == 'P':
426  return PreEDModulePrefetchingParser(payload, moduleNames)
427  if step == 'p':
428  return PostEDModulePrefetchingParser(payload, moduleNames)
429  if step == 'A':
430  return PreEDModuleAcquireParser(payload, moduleNames)
431  if step == 'a':
432  return PostEDModuleAcquireParser(payload, moduleNames)
433  if step == 'D':
434  return PreEDModuleEventDelayedGetParser(payload, moduleNames)
435  if step == 'd':
436  return PostEDModuleEventDelayedGetParser(payload, moduleNames)
437  if step == 'R':
438  return PreEventReadFromSourceParser(payload, moduleNames)
439  if step == 'r':
440  return PostEventReadFromSourceParser(payload, moduleNames)
441  if step == 'N':
442  return PreESModuleTransitionParser(payload, moduleNames, esModuleNames, recordNames)
443  if step == 'n':
444  return PostESModuleTransitionParser(payload, moduleNames, esModuleNames, recordNames)
445  if step == 'Q':
446  return PreESModulePrefetchingParser(payload, moduleNames, esModuleNames, recordNames)
447  if step == 'q':
448  return PostESModulePrefetchingParser(payload, moduleNames, esModuleNames, recordNames)
449  if step == 'B':
450  return PreESModuleAcquireParser(payload, moduleNames, esModuleNames, recordNames)
451  if step == 'b':
452  return PostESModuleAcquireParser(payload, moduleNames, esModuleNames, recordNames)
453 
454 
455 #----------------------------------------------
def lineParserFactory(step, payload, moduleNames, esModuleNames, recordNames, frameworkOnly)

◆ printHelp()

def edmTracerCompactLogViewer.printHelp ( )

Definition at line 9 of file edmTracerCompactLogViewer.py.

9 def printHelp():
10  s = '''
11 To Use: Add the Tracer Service to the cmsRun job use something like this
12  in the configuration:
13 
14  process.add_(cms.Service("Tracer", fileName = cms.untracked.string("tracer.log")))
15 
16  After running the job, execute this script and pass the name of the
17  Tracer log file to the script.
18 
19  This script will output a more human readable form of the data in the Tracer log file.'''
20  return s
21 
22 #these values come from tracer_setupFile.cc
23 #enum class Step : char {
24 # preSourceTransition = 'S',
25 # postSourceTransition = 's',
26 # preModulePrefetching = 'P',
27 # postModulePrefetching = 'p',
28 # preModuleEventAcquire = 'A',
29 # postModuleEventAcquire = 'a',
30 # preModuleTransition = 'M',
31 # preEventReadFromSource = 'R',
32 # postEventReadFromSource = 'r',
33 # preModuleEventDelayedGet = 'D',
34 # postModuleEventDelayedGet = 'd',
35 # postModuleTransition = 'm',
36 # preESModulePrefetching = 'Q',
37 # postESModulePrefetching = 'q',
38 # preESModule = 'N',
39 # postESModule = 'n',
40 # preESModuleAcquire = 'B',
41 # postESModuleAcquire = 'b',
42 # preFrameworkTransition = 'F',
43 # postFrameworkTransition = 'f'
44 #};
45 
46 
47 #Special names

◆ processingStepsFromFile()

def edmTracerCompactLogViewer.processingStepsFromFile (   f,
  moduleNames,
  esModuleNames,
  recordNames,
  frameworkOnly 
)

Definition at line 456 of file edmTracerCompactLogViewer.py.

References lineParserFactory(), and mkLumiAveragedPlots.tuple.

Referenced by edmTracerCompactLogViewer.TracerCompactFileParser.processingSteps().

456 def processingStepsFromFile(f,moduleNames, esModuleNames, recordNames, frameworkOnly):
457  for rawl in f:
458  l = rawl.strip()
459  if not l or l[0] == '#':
460  continue
461  (step,payload) = tuple(l.split(None,1))
462  payload=payload.split()
463 
464  parser = lineParserFactory(step, payload, moduleNames, esModuleNames, recordNames, frameworkOnly)
465  if parser:
466  yield parser
467  return
468 
def lineParserFactory(step, payload, moduleNames, esModuleNames, recordNames, frameworkOnly)
def processingStepsFromFile(f, moduleNames, esModuleNames, recordNames, frameworkOnly)

◆ textOutput()

def edmTracerCompactLogViewer.textOutput (   parser)

Definition at line 525 of file edmTracerCompactLogViewer.py.

References print().

525 def textOutput( parser ):
526  context = {}
527  for p in parser.processingSteps():
528  print(p.text(context))
529 
530 #=======================================
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ textPrefix_()

def edmTracerCompactLogViewer.textPrefix_ (   time,
  indentLevel 
)

Definition at line 162 of file edmTracerCompactLogViewer.py.

Referenced by edmTracerCompactLogViewer.FrameworkTransitionParser.textPrefix(), edmTracerCompactLogViewer.SourceTransitionParser.textPrefix(), edmTracerCompactLogViewer.EDModuleTransitionParser.textPrefix(), and edmTracerCompactLogViewer.ESModuleTransitionParser.textPrefix().

162 def textPrefix_(time, indentLevel):
163  #using 11 spaces for time should accomodate a job that runs 24 hrs
164  return f'{time:>11} '+"++"*indentLevel
165 
def textPrefix_(time, indentLevel)

◆ transitionIndentLevel()

def edmTracerCompactLogViewer.transitionIndentLevel (   transition)

Definition at line 129 of file edmTracerCompactLogViewer.py.

Referenced by edmTracerCompactLogViewer.EDModuleTransitionParser.baseIndentLevel(), edmTracerCompactLogViewer.ESModuleTransitionParser.baseIndentLevel(), and edmTracerCompactLogViewer.FrameworkTransitionParser.indentLevel().

129 def transitionIndentLevel(transition):
130  if transition == Phase.startTracing:
131  return 0
132  if transition == Phase.construction or transition == Phase.destruction:
133  return 0
134  if transition == Phase.endJob or transition == Phase.beginJob:
135  return 0
136  if transition == Phase.beginStream or transition == Phase.endStream:
137  return 0
138  if transition == Phase.beginProcessBlock or transition == Phase.endProcessBlock:
139  return 1
140  if transition == Phase.accessInputProcessBlock:
141  return 1
142  if transition == Phase.writeProcessBlock:
143  return 1
144  if transition == Phase.globalBeginRun or Phase.globalEndRun == transition:
145  return 1
146  if transition == Phase.globalWriteRun:
147  return 1
148  if transition == Phase.streamBeginRun or Phase.streamEndRun == transition:
149  return 1
150  if transition == Phase.globalBeginLumi or Phase.globalEndLumi == transition:
151  return 2
152  if transition == Phase.globalWriteLumi:
153  return 2
154  if transition == Phase.streamBeginLumi or Phase.streamEndLumi == transition:
155  return 2
156  if transition == Phase.Event:
157  return 3
158  if transition == Phase.esSyncEnqueue or transition == Phase.esSync:
159  return 1
160  return None
161 

◆ transitionName()

def edmTracerCompactLogViewer.transitionName (   transition)

Definition at line 79 of file edmTracerCompactLogViewer.py.

79 def transitionName(transition):
80  if transition == Phase.startTracing:
81  return 'start tracing'
82  if transition == Phase.construction:
83  return 'construction'
84  if transition == Phase.destruction:
85  return 'destruction'
86  if transition == Phase.beginJob:
87  return 'begin job'
88  if transition == Phase.endJob:
89  return 'end job'
90  if transition == Phase.beginStream:
91  return 'begin stream'
92  if transition == Phase.endStream:
93  return 'end stream'
94  if transition == Phase.beginProcessBlock:
95  return 'begin process block'
96  if transition == Phase.endProcessBlock:
97  return 'end process block'
98  if transition == Phase.accessInputProcessBlock:
99  return 'access input process block'
100  if transition == Phase.writeProcessBlock:
101  return 'write process block'
102  if transition == Phase.globalBeginRun:
103  return 'global begin run'
104  if transition == Phase.globalEndRun:
105  return 'global end run'
106  if transition == Phase.globalWriteRun:
107  return 'global write run'
108  if transition == Phase.streamBeginRun:
109  return 'stream begin run'
110  if transition == Phase.streamEndRun:
111  return 'stream end run'
112  if transition == Phase.globalBeginLumi:
113  return 'global begin lumi'
114  if transition == Phase.globalEndLumi:
115  return 'global end lumi'
116  if transition == Phase.globalWriteLumi:
117  return 'global write lumi'
118  if transition == Phase.streamBeginLumi:
119  return 'stream begin lumi'
120  if transition == Phase.streamEndLumi:
121  return 'stream end lumi'
122  if transition == Phase.esSyncEnqueue:
123  return 'EventSetup synchronization'
124  if transition == Phase.esSync:
125  return 'EventSetup synchronization'
126  if transition == Phase.Event:
127  return 'event'
128 

Variable Documentation

◆ action

edmTracerCompactLogViewer.action

Definition at line 544 of file edmTracerCompactLogViewer.py.

◆ args

edmTracerCompactLogViewer.args

Definition at line 546 of file edmTracerCompactLogViewer.py.

◆ description

edmTracerCompactLogViewer.description

Definition at line 537 of file edmTracerCompactLogViewer.py.

◆ epilog

edmTracerCompactLogViewer.epilog

Definition at line 539 of file edmTracerCompactLogViewer.py.

◆ formatter_class

edmTracerCompactLogViewer.formatter_class

Definition at line 538 of file edmTracerCompactLogViewer.py.

◆ help

edmTracerCompactLogViewer.help

Definition at line 542 of file edmTracerCompactLogViewer.py.

◆ kSourceDelayedRead

edmTracerCompactLogViewer.kSourceDelayedRead

Definition at line 49 of file edmTracerCompactLogViewer.py.

◆ kSourceFindEvent

edmTracerCompactLogViewer.kSourceFindEvent

Definition at line 48 of file edmTracerCompactLogViewer.py.

◆ parser

edmTracerCompactLogViewer.parser

Definition at line 537 of file edmTracerCompactLogViewer.py.

◆ type

edmTracerCompactLogViewer.type

Definition at line 541 of file edmTracerCompactLogViewer.py.