3 import time, os, sys, math, re, gzip
6 from cmsPerfCommons
import CandFname
9 from array
import array
13 _cmsver = os.environ[
'CMSSW_VERSION']
14 values_set=(
'vsize',
'delta_vsize',
'rss',
'delta_rss')
17 """Base class for exceptions in this module."""
21 """Exception raised when Could not parse TimingReport Log.
24 expression -- input expression in which the error occurred
25 message -- explanation of the error
32 """Exception raised when Could not parse TimingReport Log.
35 expression -- input expression in which the error occurred
36 message -- explanation of the error
43 """Exception raised when Could not parse TimingReport Log.
46 expression -- input expression in which the error occurred
47 message -- explanation of the error
54 """Exception raised when Could not parse TimingReport Log.
57 expression -- input expression in which the error occurred
58 message -- explanation of the error
68 parser = opt.OptionParser()
72 parser.add_option(
'-n',
74 help=
'Number of secs per bin. Default is 1.' ,
77 parser.add_option(
'-t',
80 choices= (
"timing",
"simplememory",
"edmsize",
"igprof",
"callgrind",
""),
81 help=
'Type of report to perform regrssion on. Default is TimingReport.' ,
84 parser.add_option(
'-i',
87 choices= (
"-y MEM_TOTAL",
"-y MEM_LIVE",
""),
88 help=
'Eventual IgProfMem counter to use for the regression. Default is no argument (IgProfPerf).' ,
91 (options,args) = parser.parse_args()
93 parser.error(
"ERROR: Not enough arguments")
97 path1 = os.path.abspath(args[0])
98 path2 = os.path.abspath(args[1])
99 if os.path.exists(path1)
and os.path.exists(path2):
100 return (path1, path2, options.startevt, options.reporttype, options.igprofmem)
102 print "Error: one of the paths does not exist"
132 sys.argv=sys.argv[:1]
133 ROOT.gROOT.SetStyle(
"Plain")
138 ROOT.gROOT.SetBatch(1)
146 rootfilename = os.path.join(outdir,filename)
148 exists = os.path.exists(rootfilename)
150 myfile=ROOT.TFile(rootfilename,
'UPDATE')
152 myfile=ROOT.TFile(rootfilename,
'RECREATE')
162 logfile=open(logfile_name,
'r')
163 logfile_lines=logfile.readlines()
168 while i < len(logfile_lines):
169 line=logfile_lines[i]
170 if 'TimeEvent>' in line:
172 line_content_list = line.split(
' ')[0:]
173 event_number = int(line_content_list[1])
174 seconds = float(line_content_list[3])
175 data.append((event_number,seconds))
185 values_set=(
'vsize',
'delta_vsize',
'rss',
'delta_rss')
188 logfile=open(logfile_name,
'r')
189 logfile_lines=logfile.readlines()
200 stepreg = re.compile(
"%s_([^_]*(_PILEUP)?)_%s((.log)|(.gz))?" % (CandFname[candle],
"TimingReport"))
202 stepreg = re.compile(
"([^_]*(_PILEUP)?)_%s((.log)|(.gz))?"%
"TimingReport")
205 found=stepreg.search(logfile_name)
207 step=found.groups()[0]
208 print "Determined step from log filename to be %s"%step
210 print "Could not determine step from log filename"
255 event_number= startevt
256 for line
in logfile_lines:
258 if '%MSG-w MemoryCheck:' in line:
260 if int(tokens[-1])>= startevt:
261 event_number=int(tokens[-1])
264 vsize=float(tokens[4])
265 delta_vsize=float(tokens[5])
267 delta_rss=float(tokens[8])
268 data.append((event_number,{
'vsize':vsize,
269 'delta_vsize':delta_vsize,
271 'delta_rss':delta_rss
276 if not len(data) == 0:
278 steps.append((step,data))
288 def newGraphAndHisto(histoleg,leg,npoints,nbins,min_val,max_val,data,graph_num,prevrev=""):
292 if not prevrev ==
"":
293 (head, tail) = os.path.split(prevrev)
294 prevRevName = os.path.basename(tail)
295 releaseNames = [
"Previous (%s)" % prevRevName,_cmsver]
297 histo=ROOT.TH1F(
"Seconds per event (histo: %s)" % graph_num,
'Seconds per event',nbins,min_val,max_val)
299 graph=ROOT.TGraph(npoints)
303 for evt_num,secs
in data:
306 graph.SetPoint(evt_counter,evt_num,secs)
311 map(
lambda x: allsecs.append(x[1]),data)
312 total = reduce(
lambda x,y: x + y,allsecs)
313 mean = total / evt_counter
314 rms = math.sqrt(reduce(
lambda x,y: x + y,
map(
lambda x: x * x,allsecs)) / evt_counter)
317 graph.SetMarkerStyle(8)
318 graph.SetMarkerSize(.7)
319 graph.SetMarkerColor(1)
320 graph.SetLineWidth(3)
321 graph.SetLineColor(colors[graph_num])
322 histo.SetLineColor(colors[graph_num])
324 histoleg.AddEntry(histo,
"%s release" % releaseNames[graph_num],
"l")
325 leg.AddEntry(graph ,
"%s release" % releaseNames[graph_num],
"l")
326 leg.AddEntry(graph ,
"Mean: %s" % str(mean) ,
"l")
327 leg.AddEntry(graph ,
"RMS : %s" % str(rms) ,
"l")
328 leg.AddEntry(graph ,
"Peak: %s" % str(peak) ,
"l")
329 leg.AddEntry(graph ,
"Total time: %s" % str(total) ,
"l")
331 histo.SetFillColor(colors[graph_num])
333 return (graph,histo,mean)
341 interval=int(max_val-min_val)
343 min_val=min_val-interval*0.2
344 max_val=max_val+interval*0.2
345 interval=int(max_val-min_val)
347 nbins=int(interval/secsperbin)
351 last_event=data[-1][0]
353 return (min_val,max_val,interval,npoints,last_event)
363 title =
'Seconds per event'
364 name =
'SecondsPerEvent'
366 ytitle =
"Processing time for each event (s)"
367 graph1.GetYaxis().SetRangeUser(0,max_val)
368 graph2.GetYaxis().SetRangeUser(0,max_val)
369 elif reporttype == 1:
370 name =
"%s_graph" % title
374 graph1.SetTitle(title)
376 graph1.GetXaxis().SetTitle(xtitle)
377 graph1.GetYaxis().SetTitleOffset(1.3)
378 graph1.GetYaxis().SetTitle(ytitle)
379 graph1.GetXaxis().SetLimits(0,last_event)
382 graph2.GetXaxis().SetLimits(0,last_event)
389 avg_line=ROOT.TLine(1,avg,last_event,avg)
390 avg_line.SetLineColor(colors[graph_num])
391 avg_line.SetLineWidth(2)
400 for x
in range(len(data2)):
402 if data2[x][0] == data1[x][0]:
403 avgEventNum = data2[x][0]
404 diffSecs = data2[x][1] - data1[x][1]
405 data3.append((avgEventNum,diffSecs))
411 graph=ROOT.TGraph(npoints)
415 for evt_num,secs
in data3:
418 graph.SetPoint(evt_counter,evt_num,secs)
422 map(
lambda x: allsecs.append(x[1]),data3)
423 total = reduce(
lambda x,y: x + y,allsecs)
424 mean = total / evt_counter
425 rms = math.sqrt(reduce(
lambda x,y: x + y,
map(
lambda x: x * x,allsecs)) / evt_counter)
429 interval=int(max_val-min_val)
431 min_val=min_val-interval*0.2
432 max_val=max_val+interval*0.2
433 interval=int(max_val-min_val)
438 new_max = min_val + orig_max_val
439 if new_max < max_val:
444 graph.SetTitle(
'Change in processing time for each event between revs')
445 graph.SetName(
'SecondsPerEvent')
446 graph.GetXaxis().SetTitle(
"Event Number")
447 graph.GetYaxis().SetTitle(
"Change in processing time between revs (s)")
448 graph.GetYaxis().SetTitleOffset(1.3)
449 graph.SetLineColor(2)
450 graph.SetMarkerStyle(8)
451 graph.SetMarkerSize(.7)
452 graph.SetMarkerColor(1)
453 graph.SetLineWidth(3)
454 graph.GetXaxis().SetLimits(0,last_event)
455 graph.GetYaxis().SetRangeUser(min_val,max_val)
456 leg = ROOT.TLegend(0.5,0.7,0.89,0.89)
457 leg.AddEntry(graph,
"Mean: %s" % str(mean),
"l")
458 leg.AddEntry(graph,
"RMS : %s" % str(rms) ,
"l")
459 leg.AddEntry(graph,
"Peak: %s" % str(peak),
"l")
460 leg.AddEntry(graph,
"Total time change: %s" % str(total) ,
"l")
468 graph_canvas = ROOT.TCanvas(
"graph_canvas")
481 histo_canvas = ROOT.TCanvas(
"histo_canvas")
483 histo_stack.Draw(
"nostack")
491 graph_canvas = ROOT.TCanvas(
"change_canvas")
501 biggestLastEvt = last_event1
502 biggestMaxval = max_val1
503 lowest_val = min_val1
505 if min_val2 < lowest_val:
506 lowest_val = min_val2
507 if last_event2 > biggestLastEvt:
508 biggestLastEvt = last_event2
509 if max_val2 > biggestMaxval:
510 biggestMaxval = max_val2
511 return (biggestLastEvt,biggestMaxval,lowest_val)
517 if data[0][0]==data[1][0]:
518 print 'Two modules seem to have some output.\nCollapsing ...'
524 new_eventnumber=dataline1[0]
525 new_vsize=dataline2[1][
'vsize']
526 new_delta_vsize=dataline1[1][
'delta_vsize']+dataline2[1][
'delta_vsize']
527 new_rss=dataline2[1][
'rss']
528 new_delta_rss=dataline1[1][
'delta_rss']+dataline2[1][
'delta_rss']
530 new_data.append((new_eventnumber,{
'vsize':new_vsize,
531 'delta_vsize':new_delta_vsize,
533 'delta_rss':new_delta_rss}))
535 if i==len(data):
break
538 print 'Collapsing: Done!'
542 return (data,len(data))
549 values = [
"vsize",
"rss"]
552 if not prevrev ==
"":
553 (head, tail) = os.path.split(prevrev)
554 prevRevName = os.path.basename(tail)
556 releaseNames = [
"Previous (%s)" % prevRevName,_cmsver]
568 graph = ROOT.TGraph(npoints)
569 graph.SetTitle(value)
570 graph.SetLineColor(colors[graph_num])
571 graph.SetMarkerStyle(8)
572 graph.SetMarkerSize(.7)
573 graph.SetMarkerColor(1)
574 graph.SetLineWidth(3)
575 graph.GetXaxis().SetTitle(
"Event")
576 graph.GetYaxis().SetTitleOffset(1.3)
577 graph.GetYaxis().SetTitle(
"MB")
583 for event_number,vals_dict
in data:
585 minim = vals_dict[value]
586 peak = vals_dict[value]
588 if vals_dict[value] > peak:
589 peak = vals_dict[value]
590 if vals_dict[value] < minim:
591 minim = vals_dict[value]
592 graph.SetPoint(point_counter, event_number, vals_dict[value])
593 total += vals_dict[value]
594 rms += vals_dict[value] * vals_dict[value]
597 rms = math.sqrt(rms / float(point_counter))
598 mean = total / float(point_counter)
599 last_event=data[-1][0]
602 graph.GetXaxis().SetRangeUser(0,last_event+1)
603 leg.AddEntry(graph ,
"%s release" % releaseNames[graph_num],
"l")
604 leg.AddEntry(graph ,
"Mean: %s" % str(mean) ,
"l")
605 leg.AddEntry(graph ,
"RMS : %s" % str(rms) ,
"l")
606 leg.AddEntry(graph ,
"Peak: %s" % str(peak) ,
"l")
610 return (graphs[0] , last_event, peaks[0], minims[0], graphs[1], last_event, peaks[1], minims[1])
615 def getMemDiff(data1,data2,npoints,last_event,orig_max_val,stepname,rss=False):
621 graph=ROOT.TGraph(npoints)
628 for x
in range(len(data2)):
630 (evtnum2,valdict2) = data2[x]
631 (evtnum1,valdict1) = data1[x]
632 if evtnum2 == evtnum1:
633 diffMBytes = valdict2[memtype] - valdict1[memtype]
639 if diffMBytes > peak:
641 if diffMBytes < minum:
643 graph.SetPoint(evt_counter,evtnum2,diffMBytes)
646 rms += (diffMBytes * diffMBytes)
652 mean = total / evt_counter
653 rms = math.sqrt(rms / float(evt_counter))
657 interval = int(max_val-min_val)
659 min_val=min_val-interval*0.2
660 max_val=max_val+interval*0.2
661 interval=int(max_val-min_val)
665 new_max = min_val + orig_max_val
666 if new_max < max_val:
671 graph.SetTitle(
"Change in %s memory usage for each event between revs for step %s" % (memtype,stepname))
672 graph.SetName(
'MemoryUsagePerEvent')
673 graph.GetXaxis().SetTitle(
"Event Number")
674 graph.GetYaxis().SetTitle(
"Change in memory usage between revs (MBs)")
675 graph.GetYaxis().SetTitleOffset(1.3)
676 graph.SetLineColor(2)
677 graph.SetMarkerStyle(8)
678 graph.SetMarkerSize(.7)
679 graph.SetMarkerColor(1)
680 graph.SetLineWidth(3)
681 graph.GetXaxis().SetLimits(0,last_event)
682 graph.GetYaxis().SetRangeUser(min_val,max_val)
683 leg = ROOT.TLegend(0.5,0.7,0.89,0.89)
684 leg.AddEntry(graph,
"Mean: %s" % str(mean),
"l")
685 leg.AddEntry(graph,
"RMS : %s" % str(rms) ,
"l")
686 leg.AddEntry(graph,
"Peak: %s" % str(peak),
"l")
687 leg.AddEntry(graph,
"Trough: %s" % str(minum) ,
"l")
694 def drawMemGraphs(graph1,graph2,min_val,max_val,last_event,leg,memtype,stepname):
695 graph_canvas=ROOT.TCanvas(
"%s_%s_canvas" % (memtype,stepname))
697 graph1.GetYaxis().SetRangeUser(min_val,max_val)
698 graph1.GetXaxis().SetRangeUser(0,last_event)
702 graph_canvas.ForceUpdate()
710 graph_canvas=ROOT.TCanvas(
"%s_%s_change_canvas" % (memtype,stepname))
714 graph_canvas.ForceUpdate()
727 def cmpSimpMemReport(rootfilename,outdir,oldLogfile,newLogfile,startevt,batch=True,candle="",prevrev=""):
732 print "#####LOGFILES in cmsPErfRegress:"
758 candreg = re.compile(
"(.*)(?:\.log)")
770 (stepname1, data1) = info1[0]
771 (stepname2, data2) = info2[0]
804 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
806 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
848 (vsize_lstevt, vsize_max_val, vsize_min_val) =
getTwoGraphLimits(vsize_lstevt1, vsize_peak1, vsize_lstevt2, vsize_peak2, vsize_minim1, vsize_minim2)
849 (rss_lstevt , rss_max_val , rss_min_val) =
getTwoGraphLimits(rss_lstevt1 , rss_peak1, rss_lstevt2 , rss_peak2, rss_minim1, rss_minim2)
851 (vsize_min,vsize_max) =
getMemOrigScale(vsize_minim1,vsize_minim2,vsize_peak1,vsize_peak2)
852 (rss_min ,rss_max ) =
getMemOrigScale(rss_minim1,rss_minim2,rss_peak1,rss_peak2)
859 title =
"%s_vsize" % stepname1)
865 title =
"%s_rss" % stepname2)
867 (vsizePerfDiffgraph, vsizeleg) =
getMemDiff(data1,data2,npoints2,vsize_lstevt, (vsize_max - vsize_min), stepname1, rss=
False)
868 (rssPerfDiffgraph, rssleg) =
getMemDiff(data1,data2,npoints2,rss_lstevt , (rss_max - rss_min) , stepname1, rss=
True )
870 vsize_canvas =
drawMemGraphs(vsize_graph1, vsize_graph2, vsize_min_val, vsize_max_val, vsize_lstevt, legs[0],
"vsize", stepname1)
871 rss_canvas =
drawMemGraphs(rss_graph1 , rss_graph2 , rss_min_val, rss_max_val, rss_lstevt, legs[1],
"rss" , stepname1)
872 vsize_change_canvas =
drawMemChangeGraphs(vsizePerfDiffgraph, vsizeleg,
"vsize", stepname1)
880 found = candreg.search(os.path.basename(newLogfile))
883 logcandle = found.groups()[0]
885 if CandFname.has_key(candle):
886 candFilename = CandFname[candle]
887 elif CandFname.has_key(logcandle):
888 candFilename = CandFname[logcandle]
890 print "%s is an unknown candle!"%candle
891 candFilename =
"Unknown-candle"
893 outputdir =
"%s_%s_SimpleMemReport" % (candFilename,stepname1)
894 outputdir = os.path.join(outdir,outputdir)
896 if not os.path.exists(outputdir):
901 newrootfile =
createROOT(outputdir,rootfilename)
903 vsize_canvas.Print( os.path.join(outputdir,
"vsize_graphs.png"),
"png")
904 rss_canvas.Print( os.path.join(outputdir,
"rss_graphs.png" ),
"png")
905 vsize_change_canvas.Print(os.path.join(outputdir,
"vsize_change.png"),
"png")
906 rss_change_canvas.Print( os.path.join(outputdir,
"rss_change.png" ),
"png")
908 map(
lambda x: x.Write(), [vsize_graph1,vsize_graph2, rss_graph1, rss_graph2, vsizePerfDiffgraph, rssPerfDiffgraph])
909 map(
lambda x: x.Write(), [vsize_canvas,rss_canvas,vsize_change_canvas,rss_change_canvas])
918 canvases.append(rss_canvas)
919 canvases.append(vsize_canvas)
920 canvases.append(vsize_change_canvas)
921 canvases.append(rss_change_canvas)
934 if len(canvases) > 0:
935 while reduce(
lambda x,y: x
or y ,canvases):
940 def cmpTimingReport(rootfilename,outdir,oldLogfile,newLogfile,secsperbin,batch=True,prevrev=""):
948 (min_val1,max_val1,nbins1,npoints1,last_event1) =
getLimits(data1,secsperbin)
949 except IndexError, detail:
953 (min_val2,max_val2,nbins2,npoints2,last_event2) =
getLimits(data2,secsperbin)
954 except IndexError, detail:
957 hsStack = ROOT.THStack(
"hsStack",
"Histogram Comparison")
958 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
959 histoleg = ROOT.TLegend(0.5,0.8,0.89,0.89)
963 (graph1,histo1,mean1) =
newGraphAndHisto(histoleg,leg,npoints1,nbins1,min_val1,max_val1,data1,0,prevrev)
965 (graph2,histo2,mean2) =
newGraphAndHisto(histoleg,leg,npoints2,nbins2,min_val2,max_val2,data2,1,prevrev)
968 (biggestLastEvt,biggestMaxval, trashthis) =
getTwoGraphLimits(last_event1,max_val1,last_event2,max_val2,min_val1,min_val2)
970 (changegraph,chgleg) =
getTimingDiff(data1,data2,npoints2,biggestLastEvt,biggestMaxval)
978 histo1.GetXaxis().SetTitle(
"s")
979 graph_canvas =
drawGraphs(graph1,graph2,avg_line1,avg_line2,leg)
991 tot_a1 = array(
"f", [ 0 ] )
992 tot_a2 = array(
"f", [ 0 ] )
997 cput.Branch(
"total1",tot_a1,
"total1/F")
998 cput.Branch(
"total2",tot_a2,
"total2/F")
1000 cput.Write(
"cpu_time_tuple",ROOT.TObject.kOverwrite)
1002 names = [
"graphs.png",
"changes.png",
"histos.png"]
1004 graph_canvas.Print( os.path.join(outdir,names[0]),
"png")
1005 changes_canvas.Print(os.path.join(outdir,names[1]),
"png")
1006 histo_canvas.Print( os.path.join(outdir,names[2]),
"png")
1008 map(
lambda x:x.Write(),[graph1,graph2,changegraph,hsStack,histo1,histo2])
1010 graph_canvas.Write()
1011 changes_canvas.Write()
1012 histo_canvas.Write()
1018 while graph_canvas
or histo_canvas
or changes_canvas:
1026 RemoveCmd=
"rm -Rf %s"%path
1027 os.system(RemoveCmd)
1028 except OSError, detail:
1029 if detail.errno == 39:
1037 os.remove(os.path.join(path,f))
1039 rmtree(os.path.join(path,d))
1040 except OSError, detail:
1042 except IOError, detail:
1049 src = os.environ[
"CMSSW_SEARCH_PATH"]
1050 except KeyError , detail:
1051 print "ERROR: scramv1 environment could not be located", detail
1053 vars = src.split(
":")
1064 cmssw_release_base =
""
1067 cmssw_release_base = os.environ[
'CMSSW_RELEASE_BASE']
1068 cmssw_data = os.environ[
'CMSSW_DATA_PATH']
1069 except KeyError, detail:
1072 xmlfile = os.path.join(cmssw_release_base,
"src",
"Validation",
"Performance",
"doc",
"regress.xml")
1074 prRoot =
"/afs/cern.ch/user/g/gbenelli/public/PerfReport2/2.0.1"
1085 tmpdir = tmp.mkdtemp(prefix=os.path.join(outdir,
"tmp"))
1087 perfcmd =
"%s %s %s -c %s -t%s -i %s -r %s -o %s" % (os.path.join(prRoot,
"bin",
"perfreport"),proftype,IgProfMemopt,xmlfile,tmpdir,file2,file1,outdir)
1088 cmd =
"tcsh -c \"cd %s ; eval `scramv1 runtime -csh` ; cd - ;source %s/etc/profile.d/init.csh ; %s\"" % (loc,prRoot,perfcmd)
1091 process = subprocess.Popen(cmd,shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
1092 exitstat = process.wait()
1093 cmdout = process.stdout.read()
1094 exitstat = process.returncode
1099 except IOError, detail:
1100 print "WARNING: Could not remove dir because IO%s" % detail
1101 except OSError, detail:
1102 print "WARNING: Could not remove dir because %s" % detail
1108 if not exitstat ==
None:
1109 sig = exitstat >> 16
1110 xstatus = exitstat & 0xffff
1111 raise PerfReportErr(
"ERROR: PerfReport returned a non-zero exit status (%s, SIG_INT = %s) run %s. Dump follows: \n%s" % (perfcmd,xstatus,sig,cmdout))
1118 gzf = gzip.open(inf,
"r")
1123 print "finish ungzipping"
1127 os.system(
"gzip -c -d %s > %s" % (inf,out))
1130 (tfile1, tfile2) = (
"",
"")
1133 (th1, tfile1) = tmp.mkstemp(prefix=os.path.join(outdir,
"igprofRegressRep."))
1134 (th2, tfile2) = tmp.mkstemp(prefix=os.path.join(outdir,
"igprofRegressRep."))
1142 perfreport(1,tfile1,tfile2,outdir,IgProfMemOpt)
1146 except OSError, detail:
1147 raise PerfReportErr(
"WARNING: The OS returned the following error when comparing %s and %s\n%s" % (file1,file2,str(detail)))
1148 if os.path.exists(tfile1):
1150 if os.path.exists(tfile2):
1152 except IOError, detail:
1153 raise PerfReportErr(
"IOError: When comparing %s and %s using temporary files %s and %s. Error message:\n%s" % (file1,file2,tfile1,tfile2,str(detail)))
1154 if os.path.exists(tfile1):
1156 if os.path.exists(tfile2):
1164 outdir = os.getcwd()
1166 (file1,file2,secsperbin,reporttype,IgProfMemOptions) =
getParameters()
1169 if reporttype ==
"timing":
1170 rootfilename =
"timingrep-regression.root"
1172 elif reporttype ==
"simplememory":
1173 rootfilename =
"simpmem-regression.root"
1175 elif reporttype ==
"edmsize":
1177 elif reporttype ==
"callgrind":
1179 elif reporttype ==
"igprof":
1181 except TimingParseErr, detail:
1182 print "WARNING: Could not parse data from Timing report file %s; not performing regression" % detail.message
1183 except SimpMemParseErr, detail:
1184 print "WARNING: Could not parse data from Memory report file %s; not performing regression" % detail.message
1185 except PerfReportErr , detail:
1186 print "WARNING: Could not parse data from Edm file %s; not performing regression" % detail.message
1187 except IOError, detail:
1189 except OSError, detail:
1192 if __name__ ==
"__main__":
def getMeanLines
Plot the mean line on a graph.
def getTwoGraphLimits
Get limits for two graphs that will be superimposed upon one another.
def getMemDiff
Produce the difference of two memory data sets.
def setBatch
Setup PyRoot as a batch run.
def getLimits
Get limits to plot the graph.
def createSimplMemGraphs
Create simple memory check graphs.
def newGraphAndHisto
Create a new timing graph and histogram.
def drawMemGraphs
Draw two memory graphs superimposed on one another.
def drawMemChangeGraphs
Draw the comparison graphs of two memory graphs.
def get_max
Get max value in data set.
def setupSuperimpose
Setup graph information for one graph (no need to it on both if they are superimposed) ...
def drawChanges
Draw data differences (comparison between two data sets or releases) on a separate canvas...
def drawGraphs
Draw superimposed graphs on a separate canvas.
def getTimingDiff
Get the difference in timing data (for comparison of two releases)
def getSimpleMemLogData
Parse memory check data from log file.
def getTimingLogData
Parse timing data from log file.
def get_min
Get min value in data set.
def drawHistos
Draw superimposed histograms on a separate canvas.
def createROOT
Create the root file to save the graphs in.