CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TimeMemoryInfo.py
Go to the documentation of this file.
1 #G.Benelli
2 #This fragment is used to add the SimpleMemoryCheck
3 #and Timing services output to the log for the Performance Suite profiling.
4 #It is meant to be used with the cmsDriver.py option
5 #--customise in the following fashion:
6 #E.g.
7 #cmsDriver.py MinBias.cfi -n 50 --step=GEN,SIM --customise=Validation/Performance/TimeMemoryInfo.py >& MinBias_GEN,SIM.log&
8 #Note there is no need to specify the "python" directory in the path.
9 
10 import FWCore.ParameterSet.Config as cms
11 def customise(process):
12  #Adding SimpleMemoryCheck service:
13  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
14  ignoreTotal=cms.untracked.int32(1),
15  oncePerEventMode=cms.untracked.bool(True))
16  #Adding Timing service:
17  process.Timing=cms.Service("Timing")
18 
19  #Add these 3 lines to put back the summary for timing information at the end of the logfile
20  #(needed for TimeReport report)
21  process.options = cms.untracked.PSet(
22  wantSummary = cms.untracked.bool(True)
23  )
24 
25  #Add the configuration for the Igprof running to dump profile snapshots:
26  process.IgProfService = cms.Service("IgProfService",
27  reportFirstEvent = cms.untracked.int32(1), #Dump first event for baseline studies
28  reportEventInterval = cms.untracked.int32(100),#Dump every 100 events (101,201,301,401,501)->Will run 501 events for Step2, HLT and FASTSIM (6 profiles+the end of job one)
29  reportToFileAtPostEvent = cms.untracked.string("| gzip -c > IgProf.%I.gz")
30  )
31 
32  return(process)
return((rh^lh)&mask)