3 import time, os, sys, math, re, gzip
6 from cmsPerfCommons
import CandFname
9 from array
import array
12 from functools
import reduce
14 _cmsver = os.environ[
'CMSSW_VERSION']
15 values_set=(
'vsize',
'delta_vsize',
'rss',
'delta_rss')
18 """Base class for exceptions in this module."""
22 """Exception raised when Could not parse TimingReport Log.
25 expression -- input expression in which the error occurred
26 message -- explanation of the error
33 """Exception raised when Could not parse TimingReport Log.
36 expression -- input expression in which the error occurred
37 message -- explanation of the error
44 """Exception raised when Could not parse TimingReport Log.
47 expression -- input expression in which the error occurred
48 message -- explanation of the error
55 """Exception raised when Could not parse TimingReport Log.
58 expression -- input expression in which the error occurred
59 message -- explanation of the error
69 parser = opt.OptionParser()
73 parser.add_option(
'-n',
75 help=
'Number of secs per bin. Default is 1.' ,
78 parser.add_option(
'-t',
81 choices= (
"timing",
"simplememory",
"edmsize",
"igprof",
"callgrind",
""),
82 help=
'Type of report to perform regrssion on. Default is TimingReport.' ,
85 parser.add_option(
'-i',
88 choices= (
"-y MEM_TOTAL",
"-y MEM_LIVE",
""),
89 help=
'Eventual IgProfMem counter to use for the regression. Default is no argument (IgProfPerf).' ,
92 (options,args) = parser.parse_args()
94 parser.error(
"ERROR: Not enough arguments")
98 path1 = os.path.abspath(args[0])
99 path2 = os.path.abspath(args[1])
100 if os.path.exists(path1)
and os.path.exists(path2):
101 return (path1, path2, options.startevt, options.reporttype, options.igprofmem)
103 print "Error: one of the paths does not exist"
133 sys.argv=sys.argv[:1]
134 ROOT.gROOT.SetStyle(
"Plain")
139 ROOT.gROOT.SetBatch(1)
147 rootfilename = os.path.join(outdir,filename)
149 exists = os.path.exists(rootfilename)
151 myfile=ROOT.TFile(rootfilename,
'UPDATE')
153 myfile=ROOT.TFile(rootfilename,
'RECREATE')
163 logfile=open(logfile_name,
'r')
164 logfile_lines=logfile.readlines()
169 while i < len(logfile_lines):
170 line=logfile_lines[i]
171 if 'TimeEvent>' in line:
173 line_content_list = line.split(
' ')[0:]
174 event_number = int(line_content_list[1])
175 seconds = float(line_content_list[3])
176 data.append((event_number,seconds))
186 values_set=(
'vsize',
'delta_vsize',
'rss',
'delta_rss')
189 logfile=open(logfile_name,
'r')
190 logfile_lines=logfile.readlines()
201 stepreg = re.compile(
"%s_([^_]*(_PILEUP)?)_%s((.log)|(.gz))?" % (CandFname[candle],
"TimingReport"))
203 stepreg = re.compile(
"([^_]*(_PILEUP)?)_%s((.log)|(.gz))?"%
"TimingReport")
206 found=stepreg.search(logfile_name)
208 step=found.groups()[0]
209 print "Determined step from log filename to be %s"%step
211 print "Could not determine step from log filename"
256 event_number= startevt
257 for line
in logfile_lines:
259 if '%MSG-w MemoryCheck:' in line:
261 if int(tokens[-1])>= startevt:
262 event_number=int(tokens[-1])
265 vsize=float(tokens[4])
266 delta_vsize=float(tokens[5])
268 delta_rss=float(tokens[8])
269 data.append((event_number,{
'vsize':vsize,
270 'delta_vsize':delta_vsize,
272 'delta_rss':delta_rss
277 if not len(data) == 0:
279 steps.append((step,data))
289 def newGraphAndHisto(histoleg,leg,npoints,nbins,min_val,max_val,data,graph_num,prevrev=""):
293 if not prevrev ==
"":
294 (head, tail) = os.path.split(prevrev)
295 prevRevName = os.path.basename(tail)
296 releaseNames = [
"Previous (%s)" % prevRevName,_cmsver]
298 histo=ROOT.TH1F(
"Seconds per event (histo: %s)" % graph_num,
'Seconds per event',nbins,min_val,max_val)
300 graph=ROOT.TGraph(npoints)
304 for evt_num,secs
in data:
307 graph.SetPoint(evt_counter,evt_num,secs)
312 map(
lambda x: allsecs.append(x[1]),data)
313 total = reduce(
lambda x,y: x + y,allsecs)
314 mean = total / evt_counter
315 rms = math.sqrt(reduce(
lambda x,y: x + y,map(
lambda x: x * x,allsecs)) / evt_counter)
318 graph.SetMarkerStyle(8)
319 graph.SetMarkerSize(.7)
320 graph.SetMarkerColor(1)
321 graph.SetLineWidth(3)
322 graph.SetLineColor(colors[graph_num])
323 histo.SetLineColor(colors[graph_num])
325 histoleg.AddEntry(histo,
"%s release" % releaseNames[graph_num],
"l")
326 leg.AddEntry(graph ,
"%s release" % releaseNames[graph_num],
"l")
327 leg.AddEntry(graph ,
"Mean: %s" % str(mean) ,
"l")
328 leg.AddEntry(graph ,
"RMS : %s" % str(rms) ,
"l")
329 leg.AddEntry(graph ,
"Peak: %s" % str(peak) ,
"l")
330 leg.AddEntry(graph ,
"Total time: %s" % str(total) ,
"l")
332 histo.SetFillColor(colors[graph_num])
334 return (graph,histo,mean)
342 interval=int(max_val-min_val)
344 min_val=min_val-interval*0.2
345 max_val=max_val+interval*0.2
346 interval=int(max_val-min_val)
348 nbins=int(interval/secsperbin)
352 last_event=data[-1][0]
354 return (min_val,max_val,interval,npoints,last_event)
364 title =
'Seconds per event'
365 name =
'SecondsPerEvent'
367 ytitle =
"Processing time for each event (s)"
368 graph1.GetYaxis().SetRangeUser(0,max_val)
369 graph2.GetYaxis().SetRangeUser(0,max_val)
370 elif reporttype == 1:
371 name =
"%s_graph" % title
375 graph1.SetTitle(title)
377 graph1.GetXaxis().SetTitle(xtitle)
378 graph1.GetYaxis().SetTitleOffset(1.3)
379 graph1.GetYaxis().SetTitle(ytitle)
380 graph1.GetXaxis().SetLimits(0,last_event)
383 graph2.GetXaxis().SetLimits(0,last_event)
390 avg_line=ROOT.TLine(1,avg,last_event,avg)
391 avg_line.SetLineColor(colors[graph_num])
392 avg_line.SetLineWidth(2)
401 for x
in range(len(data2)):
403 if data2[x][0] == data1[x][0]:
404 avgEventNum = data2[x][0]
405 diffSecs = data2[x][1] - data1[x][1]
406 data3.append((avgEventNum,diffSecs))
412 graph=ROOT.TGraph(npoints)
416 for evt_num,secs
in data3:
419 graph.SetPoint(evt_counter,evt_num,secs)
423 map(
lambda x: allsecs.append(x[1]),data3)
424 total = reduce(
lambda x,y: x + y,allsecs)
425 mean = total / evt_counter
426 rms = math.sqrt(reduce(
lambda x,y: x + y,map(
lambda x: x * x,allsecs)) / evt_counter)
430 interval=int(max_val-min_val)
432 min_val=min_val-interval*0.2
433 max_val=max_val+interval*0.2
434 interval=int(max_val-min_val)
439 new_max = min_val + orig_max_val
440 if new_max < max_val:
445 graph.SetTitle(
'Change in processing time for each event between revs')
446 graph.SetName(
'SecondsPerEvent')
447 graph.GetXaxis().SetTitle(
"Event Number")
448 graph.GetYaxis().SetTitle(
"Change in processing time between revs (s)")
449 graph.GetYaxis().SetTitleOffset(1.3)
450 graph.SetLineColor(2)
451 graph.SetMarkerStyle(8)
452 graph.SetMarkerSize(.7)
453 graph.SetMarkerColor(1)
454 graph.SetLineWidth(3)
455 graph.GetXaxis().SetLimits(0,last_event)
456 graph.GetYaxis().SetRangeUser(min_val,max_val)
457 leg = ROOT.TLegend(0.5,0.7,0.89,0.89)
458 leg.AddEntry(graph,
"Mean: %s" % str(mean),
"l")
459 leg.AddEntry(graph,
"RMS : %s" % str(rms) ,
"l")
460 leg.AddEntry(graph,
"Peak: %s" % str(peak),
"l")
461 leg.AddEntry(graph,
"Total time change: %s" % str(total) ,
"l")
469 graph_canvas = ROOT.TCanvas(
"graph_canvas")
482 histo_canvas = ROOT.TCanvas(
"histo_canvas")
484 histo_stack.Draw(
"nostack")
492 graph_canvas = ROOT.TCanvas(
"change_canvas")
502 biggestLastEvt = last_event1
503 biggestMaxval = max_val1
504 lowest_val = min_val1
506 if min_val2 < lowest_val:
507 lowest_val = min_val2
508 if last_event2 > biggestLastEvt:
509 biggestLastEvt = last_event2
510 if max_val2 > biggestMaxval:
511 biggestMaxval = max_val2
512 return (biggestLastEvt,biggestMaxval,lowest_val)
518 if data[0][0]==data[1][0]:
519 print 'Two modules seem to have some output.\nCollapsing ...'
525 new_eventnumber=dataline1[0]
526 new_vsize=dataline2[1][
'vsize']
527 new_delta_vsize=dataline1[1][
'delta_vsize']+dataline2[1][
'delta_vsize']
528 new_rss=dataline2[1][
'rss']
529 new_delta_rss=dataline1[1][
'delta_rss']+dataline2[1][
'delta_rss']
531 new_data.append((new_eventnumber,{
'vsize':new_vsize,
532 'delta_vsize':new_delta_vsize,
534 'delta_rss':new_delta_rss}))
536 if i==len(data):
break
539 print 'Collapsing: Done!'
543 return (data,len(data))
550 values = [
"vsize",
"rss"]
553 if not prevrev ==
"":
554 (head, tail) = os.path.split(prevrev)
555 prevRevName = os.path.basename(tail)
557 releaseNames = [
"Previous (%s)" % prevRevName,_cmsver]
569 graph = ROOT.TGraph(npoints)
570 graph.SetTitle(value)
571 graph.SetLineColor(colors[graph_num])
572 graph.SetMarkerStyle(8)
573 graph.SetMarkerSize(.7)
574 graph.SetMarkerColor(1)
575 graph.SetLineWidth(3)
576 graph.GetXaxis().SetTitle(
"Event")
577 graph.GetYaxis().SetTitleOffset(1.3)
578 graph.GetYaxis().SetTitle(
"MB")
584 for event_number,vals_dict
in data:
586 minim = vals_dict[value]
587 peak = vals_dict[value]
589 if vals_dict[value] > peak:
590 peak = vals_dict[value]
591 if vals_dict[value] < minim:
592 minim = vals_dict[value]
593 graph.SetPoint(point_counter, event_number, vals_dict[value])
594 total += vals_dict[value]
595 rms += vals_dict[value] * vals_dict[value]
598 rms = math.sqrt(rms / float(point_counter))
599 mean = total / float(point_counter)
600 last_event=data[-1][0]
603 graph.GetXaxis().SetRangeUser(0,last_event+1)
604 leg.AddEntry(graph ,
"%s release" % releaseNames[graph_num],
"l")
605 leg.AddEntry(graph ,
"Mean: %s" % str(mean) ,
"l")
606 leg.AddEntry(graph ,
"RMS : %s" % str(rms) ,
"l")
607 leg.AddEntry(graph ,
"Peak: %s" % str(peak) ,
"l")
611 return (graphs[0] , last_event, peaks[0], minims[0], graphs[1], last_event, peaks[1], minims[1])
616 def getMemDiff(data1,data2,npoints,last_event,orig_max_val,stepname,rss=False):
622 graph=ROOT.TGraph(npoints)
629 for x
in range(len(data2)):
631 (evtnum2,valdict2) = data2[x]
632 (evtnum1,valdict1) = data1[x]
633 if evtnum2 == evtnum1:
634 diffMBytes = valdict2[memtype] - valdict1[memtype]
640 if diffMBytes > peak:
642 if diffMBytes < minum:
644 graph.SetPoint(evt_counter,evtnum2,diffMBytes)
647 rms += (diffMBytes * diffMBytes)
653 mean = total / evt_counter
654 rms = math.sqrt(rms / float(evt_counter))
658 interval = int(max_val-min_val)
660 min_val=min_val-interval*0.2
661 max_val=max_val+interval*0.2
662 interval=int(max_val-min_val)
666 new_max = min_val + orig_max_val
667 if new_max < max_val:
672 graph.SetTitle(
"Change in %s memory usage for each event between revs for step %s" % (memtype,stepname))
673 graph.SetName(
'MemoryUsagePerEvent')
674 graph.GetXaxis().SetTitle(
"Event Number")
675 graph.GetYaxis().SetTitle(
"Change in memory usage between revs (MBs)")
676 graph.GetYaxis().SetTitleOffset(1.3)
677 graph.SetLineColor(2)
678 graph.SetMarkerStyle(8)
679 graph.SetMarkerSize(.7)
680 graph.SetMarkerColor(1)
681 graph.SetLineWidth(3)
682 graph.GetXaxis().SetLimits(0,last_event)
683 graph.GetYaxis().SetRangeUser(min_val,max_val)
684 leg = ROOT.TLegend(0.5,0.7,0.89,0.89)
685 leg.AddEntry(graph,
"Mean: %s" % str(mean),
"l")
686 leg.AddEntry(graph,
"RMS : %s" % str(rms) ,
"l")
687 leg.AddEntry(graph,
"Peak: %s" % str(peak),
"l")
688 leg.AddEntry(graph,
"Trough: %s" % str(minum) ,
"l")
695 def drawMemGraphs(graph1,graph2,min_val,max_val,last_event,leg,memtype,stepname):
696 graph_canvas=ROOT.TCanvas(
"%s_%s_canvas" % (memtype,stepname))
698 graph1.GetYaxis().SetRangeUser(min_val,max_val)
699 graph1.GetXaxis().SetRangeUser(0,last_event)
703 graph_canvas.ForceUpdate()
711 graph_canvas=ROOT.TCanvas(
"%s_%s_change_canvas" % (memtype,stepname))
715 graph_canvas.ForceUpdate()
728 def cmpSimpMemReport(rootfilename,outdir,oldLogfile,newLogfile,startevt,batch=True,candle="",prevrev=""):
733 print "#####LOGFILES in cmsPErfRegress:"
759 candreg = re.compile(
"(.*)(?:\.log)")
771 (stepname1, data1) = info1[0]
772 (stepname2, data2) = info2[0]
805 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
807 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
849 (vsize_lstevt, vsize_max_val, vsize_min_val) =
getTwoGraphLimits(vsize_lstevt1, vsize_peak1, vsize_lstevt2, vsize_peak2, vsize_minim1, vsize_minim2)
850 (rss_lstevt , rss_max_val , rss_min_val) =
getTwoGraphLimits(rss_lstevt1 , rss_peak1, rss_lstevt2 , rss_peak2, rss_minim1, rss_minim2)
852 (vsize_min,vsize_max) =
getMemOrigScale(vsize_minim1,vsize_minim2,vsize_peak1,vsize_peak2)
853 (rss_min ,rss_max ) =
getMemOrigScale(rss_minim1,rss_minim2,rss_peak1,rss_peak2)
860 title =
"%s_vsize" % stepname1)
866 title =
"%s_rss" % stepname2)
868 (vsizePerfDiffgraph, vsizeleg) =
getMemDiff(data1,data2,npoints2,vsize_lstevt, (vsize_max - vsize_min), stepname1, rss=
False)
869 (rssPerfDiffgraph, rssleg) =
getMemDiff(data1,data2,npoints2,rss_lstevt , (rss_max - rss_min) , stepname1, rss=
True )
871 vsize_canvas =
drawMemGraphs(vsize_graph1, vsize_graph2, vsize_min_val, vsize_max_val, vsize_lstevt, legs[0],
"vsize", stepname1)
872 rss_canvas =
drawMemGraphs(rss_graph1 , rss_graph2 , rss_min_val, rss_max_val, rss_lstevt, legs[1],
"rss" , stepname1)
873 vsize_change_canvas =
drawMemChangeGraphs(vsizePerfDiffgraph, vsizeleg,
"vsize", stepname1)
881 found = candreg.search(os.path.basename(newLogfile))
884 logcandle = found.groups()[0]
886 if candle
in CandFname:
887 candFilename = CandFname[candle]
888 elif logcandle
in CandFname:
889 candFilename = CandFname[logcandle]
891 print "%s is an unknown candle!"%candle
892 candFilename =
"Unknown-candle"
894 outputdir =
"%s_%s_SimpleMemReport" % (candFilename,stepname1)
895 outputdir = os.path.join(outdir,outputdir)
897 if not os.path.exists(outputdir):
902 newrootfile =
createROOT(outputdir,rootfilename)
904 vsize_canvas.Print( os.path.join(outputdir,
"vsize_graphs.png"),
"png")
905 rss_canvas.Print( os.path.join(outputdir,
"rss_graphs.png" ),
"png")
906 vsize_change_canvas.Print(os.path.join(outputdir,
"vsize_change.png"),
"png")
907 rss_change_canvas.Print( os.path.join(outputdir,
"rss_change.png" ),
"png")
909 map(
lambda x: x.Write(), [vsize_graph1,vsize_graph2, rss_graph1, rss_graph2, vsizePerfDiffgraph, rssPerfDiffgraph])
910 map(
lambda x: x.Write(), [vsize_canvas,rss_canvas,vsize_change_canvas,rss_change_canvas])
919 canvases.append(rss_canvas)
920 canvases.append(vsize_canvas)
921 canvases.append(vsize_change_canvas)
922 canvases.append(rss_change_canvas)
935 if len(canvases) > 0:
936 while reduce(
lambda x,y: x
or y ,canvases):
941 def cmpTimingReport(rootfilename,outdir,oldLogfile,newLogfile,secsperbin,batch=True,prevrev=""):
949 (min_val1,max_val1,nbins1,npoints1,last_event1) =
getLimits(data1,secsperbin)
950 except IndexError
as detail:
954 (min_val2,max_val2,nbins2,npoints2,last_event2) =
getLimits(data2,secsperbin)
955 except IndexError
as detail:
958 hsStack = ROOT.THStack(
"hsStack",
"Histogram Comparison")
959 leg = ROOT.TLegend(0.6,0.99,0.89,0.8)
960 histoleg = ROOT.TLegend(0.5,0.8,0.89,0.89)
964 (graph1,histo1,mean1) =
newGraphAndHisto(histoleg,leg,npoints1,nbins1,min_val1,max_val1,data1,0,prevrev)
966 (graph2,histo2,mean2) =
newGraphAndHisto(histoleg,leg,npoints2,nbins2,min_val2,max_val2,data2,1,prevrev)
969 (biggestLastEvt,biggestMaxval, trashthis) =
getTwoGraphLimits(last_event1,max_val1,last_event2,max_val2,min_val1,min_val2)
971 (changegraph,chgleg) =
getTimingDiff(data1,data2,npoints2,biggestLastEvt,biggestMaxval)
979 histo1.GetXaxis().SetTitle(
"s")
980 graph_canvas =
drawGraphs(graph1,graph2,avg_line1,avg_line2,leg)
992 tot_a1 =
array(
"f", [ 0 ] )
993 tot_a2 =
array(
"f", [ 0 ] )
998 cput.Branch(
"total1",tot_a1,
"total1/F")
999 cput.Branch(
"total2",tot_a2,
"total2/F")
1001 cput.Write(
"cpu_time_tuple",ROOT.TObject.kOverwrite)
1003 names = [
"graphs.png",
"changes.png",
"histos.png"]
1005 graph_canvas.Print( os.path.join(outdir,names[0]),
"png")
1006 changes_canvas.Print(os.path.join(outdir,names[1]),
"png")
1007 histo_canvas.Print( os.path.join(outdir,names[2]),
"png")
1009 map(
lambda x:x.Write(),[graph1,graph2,changegraph,hsStack,histo1,histo2])
1011 graph_canvas.Write()
1012 changes_canvas.Write()
1013 histo_canvas.Write()
1019 while graph_canvas
or histo_canvas
or changes_canvas:
1027 RemoveCmd=
"rm -Rf %s"%path
1028 os.system(RemoveCmd)
1029 except OSError
as detail:
1030 if detail.errno == 39:
1038 os.remove(os.path.join(path,f))
1040 rmtree(os.path.join(path,d))
1041 except OSError
as detail:
1043 except IOError
as detail:
1050 src = os.environ[
"CMSSW_SEARCH_PATH"]
1051 except KeyError
as detail:
1052 print "ERROR: scramv1 environment could not be located", detail
1054 vars = src.split(
":")
1065 cmssw_release_base =
""
1068 cmssw_release_base = os.environ[
'CMSSW_RELEASE_BASE']
1069 cmssw_data = os.environ[
'CMSSW_DATA_PATH']
1070 except KeyError
as detail:
1073 xmlfile = os.path.join(cmssw_release_base,
"src",
"Validation",
"Performance",
"doc",
"regress.xml")
1075 prRoot =
"/afs/cern.ch/user/g/gbenelli/public/PerfReport2/2.0.1"
1086 tmpdir = tmp.mkdtemp(prefix=os.path.join(outdir,
"tmp"))
1088 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)
1089 cmd =
"tcsh -c \"cd %s ; eval `scramv1 runtime -csh` ; cd - ;source %s/etc/profile.d/init.csh ; %s\"" % (loc,prRoot,perfcmd)
1092 process = subprocess.Popen(cmd,shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
1093 exitstat = process.wait()
1094 cmdout = process.stdout.read()
1095 exitstat = process.returncode
1100 except IOError
as detail:
1101 print "WARNING: Could not remove dir because IO%s" % detail
1102 except OSError
as detail:
1103 print "WARNING: Could not remove dir because %s" % detail
1109 if not exitstat ==
None:
1110 sig = exitstat >> 16
1111 xstatus = exitstat & 0xffff
1112 raise PerfReportErr(
"ERROR: PerfReport returned a non-zero exit status (%s, SIG_INT = %s) run %s. Dump follows: \n%s" % (perfcmd,xstatus,sig,cmdout))
1119 gzf = gzip.open(inf,
"r")
1124 print "finish ungzipping"
1128 os.system(
"gzip -c -d %s > %s" % (inf,out))
1131 (tfile1, tfile2) = (
"",
"")
1134 (th1, tfile1) = tmp.mkstemp(prefix=os.path.join(outdir,
"igprofRegressRep."))
1135 (th2, tfile2) = tmp.mkstemp(prefix=os.path.join(outdir,
"igprofRegressRep."))
1143 perfreport(1,tfile1,tfile2,outdir,IgProfMemOpt)
1147 except OSError
as detail:
1148 raise PerfReportErr(
"WARNING: The OS returned the following error when comparing %s and %s\n%s" % (file1,file2,str(detail)))
1149 if os.path.exists(tfile1):
1151 if os.path.exists(tfile2):
1153 except IOError
as detail:
1154 raise PerfReportErr(
"IOError: When comparing %s and %s using temporary files %s and %s. Error message:\n%s" % (file1,file2,tfile1,tfile2,str(detail)))
1155 if os.path.exists(tfile1):
1157 if os.path.exists(tfile2):
1165 outdir = os.getcwd()
1167 (file1,file2,secsperbin,reporttype,IgProfMemOptions) =
getParameters()
1170 if reporttype ==
"timing":
1171 rootfilename =
"timingrep-regression.root"
1173 elif reporttype ==
"simplememory":
1174 rootfilename =
"simpmem-regression.root"
1176 elif reporttype ==
"edmsize":
1178 elif reporttype ==
"callgrind":
1180 elif reporttype ==
"igprof":
1182 except TimingParseErr
as detail:
1183 print "WARNING: Could not parse data from Timing report file %s; not performing regression" % detail.message
1184 except SimpMemParseErr
as detail:
1185 print "WARNING: Could not parse data from Memory report file %s; not performing regression" % detail.message
1186 except PerfReportErr
as detail:
1187 print "WARNING: Could not parse data from Edm file %s; not performing regression" % detail.message
1188 except IOError
as detail:
1190 except OSError
as detail:
1193 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.