ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TWikiIB/makeQAPage.py
Revision: 1.4
Committed: Tue Sep 8 09:53:23 2009 UTC (15 years, 7 months ago) by geonmo
Content type: text/x-python
Branch: MAIN
Changes since 1.3: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 geonmo 1.1 #!/usr/bin/env python
2     # -*- coding: utf-8 -*-
3     import os, sys, time, re, urllib
4    
5     class mkQAPage(object) :
6     def __init__(self, tday, arch, packagename) :
7     self.tday = tday
8     self.arch = arch
9     self.packagename = packagename
10     self.summarytype = self.packagename[6]+'.'+self.packagename[8]+'-'+self.tday+'-'+self.packagename[23:25]
11     print tday,arch,packagename
12    
13     def makePage(self) :
14     import config
15 geonmo 1.3 pagefile = open(config.siteInfo['IBPath']+self.packagename+'.txt','w')
16     pagefile.write('''%META:TOPICINFO{author="GunmoRyu" date="1248793608" format="1.1" version="1.1"}%\n%META:TOPICPARENT{name="IBQA"}%\n''')
17    
18     pagefile.write("""
19     <!--
20     * Set MENU_ID = test
21     -->
22    
23     <style> /* <pre> */
24     %STARTSECTION{"css"}%
25    
26     #%MENU_ID% ul{
27     margin: 0px;
28     pading: 0px;
29     }
30    
31     #%MENU_ID% ul li{
32     position:relative;
33     list-style: none;
34     margin: 0px 0px 0px 15px;
35     float: left;
36     font-family: sans-serif;
37     font-weight: 800;
38     font-size: 12px;
39     }
40    
41     #%MENU_ID% ul ul li{
42     position:relative;
43     font-weight: 500;
44     float: none;
45     margin: 0px 0px 0px -40px;
46     pading: 0px;
47     border: none;
48     background-color: none;
49     border-top: 1px solid #F8F8F8;
50     border-bottom: 1px solid #C0C0C0;
51     }
52     #%MENU_ID%.msie ul ul li{
53     position:relative;
54     margin-left: 0px;
55     }
56    
57     #%MENU_ID% ul ul{
58     margin: 0px;
59     clear: left;
60     display: none;
61     position: absolute;
62     top: 20px;
63     left: 0px;
64     background-color: #E0E0E0;
65     border: 1px solid #808080;
66     width: 150px;
67     z-index:30;
68     }
69     #%MENU_ID%.msie ul ul{
70     width: 180px;
71     }
72    
73     #%MENU_ID% ul ul ul{
74     top: 5px;
75     left: 190px;
76     }
77    
78     #%MENU_ID% a:link,
79     #%MENU_ID% a:active,
80     #%MENU_ID% a:visited{
81     text-decoration: none;
82     color: #0E0E0E;
83     overflow: hidden;
84     }
85    
86     #%MENU_ID% ul ul a{
87     padding: 0px 2px 0px 5px;
88     display: block;
89     background-color: #DCDCDC;
90     z-index:20;
91     }
92    
93     #%MENU_ID% ul ul a:hover{
94     background-color: #0EEEEE;
95     }
96    
97     #%MENU_ID% ul ul a.linkSubMenu:link,
98     #%MENU_ID% ul ul a.linkSubMenu:active,
99     #%MENU_ID% ul ul a.linkSubMenu:visited{
100     font-weight: 800;
101     }
102     %ENDSECTION{"css"}%
103     /* </pre> */ </style>
104     """)
105     pagefile.write('''---+CMSSW Integration Build QA Info
106 geonmo 1.1 ---++Integration Build '''+self.packagename)
107 geonmo 1.3 pagefile.write('\n---++ Ignominy information\n')
108     pagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/dependencies.txt][Dependency data]]\n')
109     pagefile.write(' * Dependency statistics\n')
110     pagefile.write(' * [['+self.packagename+'External][External tools versions]]\n')
111     pagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/index-subsystem.html][Individual Sub-Systems]]\n')
112 geonmo 1.1
113 geonmo 1.3 pagefile.write(' * Metrics\n')
114     pagefile.write(' * Summary\n')
115 geonmo 1.1 from makeDepMetrics import mkDepMetrics
116 geonmo 1.3 mkDM = mkDepMetrics(pagefile, self.tday,self.arch,self.packagename)
117 geonmo 1.2 mkDM.makeSummary()
118 geonmo 1.4 pagefile.write('\n * Metrics ALL _(Please, Mouse over)_ ')
119 geonmo 1.1 pkglist = mkDM.packlist()
120     outputlist = mkDM.repack(pkglist)
121     mkDM.dropdown(outputlist)
122    
123 geonmo 1.3 pagefile.write('---++Timing/Memory/FileSize information\n')
124     pagefile.write(' * _Using the timing/memory services on the Production !MinBias and !TTbar !RelVals (1 and 2 in cmsDriver_standard_hlt.txt). File size as reported by operating system._\n')
125     pagefile.write(' * Timing/Memory result _( Click : Large, !DoubleClick : Small)_\n')
126 geonmo 1.1 if self.packagename[8]=='1' or self.packagename[8]=='3':
127 geonmo 1.3 pagefile.write('''
128 geonmo 1.1
129     %TABLE{ sort="off" tableborder="0" cellborder="0" valign="top" tablewidth="100%" columnwidths="100%,0%" }%
130     | *VMEM* |<img src="%ATTACHURLPATH%/1_thum.png" onclick="this.src='%ATTACHURL%/1.png'" ondblclick="this.src='%ATTACHURL%/1_thum.png'">|
131     |*Description* : This histogram is the total amount of virtual memory used by the task. |^|
132     |^|^|
133     | *RSS* |<img src="%ATTACHURLPATH%/2_thum.png" onclick="this.src='%ATTACHURL%/2.png'" ondblclick="this.src='%ATTACHURL%/2_thum.png'">|
134     |*Description* : This histogram is a task’s currently used share of available physical memory. |^|
135     |^|^|
136     | *CPU Time* |<img src="%ATTACHURLPATH%/3_thum.png" onclick="this.src='%ATTACHURL%/3.png'" ondblclick="this.src='%ATTACHURL%/3_thum.png'">|
137     |*Description* : This histogram is total CPU time the task has used since it started. |^|
138     |^|^|
139     | *RAW Size* |<img src="%ATTACHURLPATH%/4_thum.png" onclick="this.src='%ATTACHURL%/4.png'" ondblclick="this.src='%ATTACHURL%/4_thum.png'">|
140     |*Description* : This histogram is the size of RAW output data. |^|
141     |^|^|
142     | *Reco Size* |<img src="%ATTACHURLPATH%/5_thum.png" onclick="this.src='%ATTACHURL%/5.png'" ondblclick="this.src='%ATTACHURL%/5_thum.png'">|
143     |*Description* : This histogram is the size of RECO output data. |^|
144     |^|^|
145    
146     ''')
147 geonmo 1.3 pagefile.write('---++ Results from (limited) performance suite\n')
148     pagefile.write(' * _Limited (for IB) performance suite results._\n')
149     pagefile.write(' * [[https://macms01.cern.ch/cgi-bin/ap/showNewPerf.py?ib='+self.packagename+'][Performance suite results]]\n')
150     pagefile.write('''
151 geonmo 1.1 ---++ Info on scram warnings and errors
152     ''')
153 geonmo 1.3 pagefile.write(' * [['+self.packagename+'ScramInfo][Info on scram warnings and errors]]\n')
154     pagefile.write('---++ Number of old-style configuration files\n')
155     pagefile.write(' * [['+self.packagename+'CfgInfo][Number of old-style configuration files (*.cff, *.cfi, *.cfg) in release cfgInfo]]\n')
156     pagefile.write('''
157 geonmo 1.1 ---++ Log file for checking Python Configuration files
158     * Log file for checking Python Configuration files pyCfgCheck
159     | *Check of Python configuration* |<img src="%ATTACHURLPATH%/pie_thum.png" onclick="this.src='%ATTACHURL%/pie.png'" ondblclick="this.src='%ATTACHURL%/pie_thum.png'">|
160     |*Description* : This histogram is the number of python error configuration file. |^|
161     |^|^|
162    
163     ---++ Duplicate definitions of dictionaries
164     ''')
165 geonmo 1.3 pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-dup.log][Duplicate definitions of dictionaries as found in class_def.xml files up]]\n')
166     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-lostDefs.log][Definition of dictionaries in the "wrong" library]]\n')
167     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-edmPD.log][Duplicate definitions of dictionaries as found in edmPlugins dupDict-edmPD]]\n')
168     pagefile.write('---+ Log file from the !BuildManager\n')
169     pagefile.write(' * [[http://cern.ch/cms-sdt/rc/'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/fullLog][Log file from the !BuildManager (check here if something _completly_ fails).]]\n')
170     pagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/prebuild.log][Log file from "scram p" and CVS checkout.]]\n')
171     pagefile.write('---+ Directory listing for the test logs\n')
172     pagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/][Directory listing for the test logs (unit-tests, all raw test logs)]]\n')
173     pagefile.write('---+ Status of documentation\n')
174     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/checkDocProxy.py?inPath=/afs/cern.ch/cms/sw/ReleaseCandidates/'+self.arch+'/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/src][Status of documentation for each subsystem and package (takes a while)]]\n')
175 geonmo 1.1
176 geonmo 1.3 pagefile.write('''-- Main.GunmoRyu & Main.HyunYongKim - 28 Jul 2009\n''')
177     pagefile.close()
178 geonmo 1.1 file_path = config.siteInfo['TWikiPubDir']+self.packagename
179     if not os.path.exists(file_path) :
180     os.system('mkdir '+file_path)
181     os.system('chown www-data.www-data '+file_path)
182     from makeScramInfo import makeScramInfo
183     SA = makeScramInfo(self.packagename+'ScramInfo.txt',self.packagename,self.tday,self.arch)
184     SA.makeLog()
185     from makeCfgInfo import makeCfgInfo
186     CA = makeCfgInfo(self.packagename+'CfgInfo.txt',self.packagename,self.tday,self.arch)
187     CA.makeLog()
188    
189     from makeExternalInfo import makeExternalInfo
190     EA = makeExternalInfo(self.packagename+'External.txt',self.packagename,self.tday,self.arch)
191     EA.makeLog()
192    
193     import datetime
194     today = datetime.date.today()
195     timestamp=today.timetuple()
196     if timestamp[0] == int(self.packagename[12:16]) and timestamp[1] == int(self.packagename[17:19]) and timestamp[2]==int (self.packagename[20:22]) :
197     os.system(config.siteInfo['IBPath']+'makeBenchmark.py')
198     from chkpy import makePyCheck
199     MPC = makePyCheck(self.tday, self.arch, self.packagename)
200     MPC.mkPyCheck()
201     os.system('chown www-data.www-data *.png;mv -f *.png '+file_path)
202    
203    
204     def usage() :
205     print 'usage',sys.argv[0],'[--dummy]'
206     print ""
207     return
208    
209     if __name__ == "__main__" :
210     import getopt
211     options = sys.argv[1:]
212     try:
213     opts, args = getopt.getopt(options, 'h',['help','dummy'])
214     except getopt.GetoptError:
215     usage()
216     sys.exit(-2)
217    
218     rel = None
219     dummy = False
220     for o,a in opts:
221     if o in ('-h','--help'):
222     usage()
223     sys.exit()
224     if o in('--dummy') :
225     dummy = True
226    
227     if not rel:
228     usage()
229     sys.exit(-1)
230