ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/parseCrabFjr.py
(Generate patch)

Comparing COMP/CRAB/python/parseCrabFjr.py (file contents):
Revision 1.7 by fanzago, Mon Feb 4 16:16:34 2008 UTC vs.
Revision 1.9 by afanfani, Tue May 13 10:22:55 2008 UTC

# Line 79 | Line 79 | def main(argv) :
79      # dashboard report dictionary
80      dashboard_report = {}
81  
82 + ##Brian's patch to sent number of events procedded to the Dashboard
83 +    # Add NoEventsPerRun to the Dashboard report
84 +    eventsPerRun = 0
85 +    for inputFile in jobReport.inputFiles:
86 +        try:
87 +            eventsRead = str(inputFile.get('EventsRead', 0))
88 +            eventsRead = int(eventsRead.strip())
89 +        except:
90 +            continue
91 +        eventsPerRun += eventsRead
92 +    dashboard_report['NoEventsPerRun'] = eventsPerRun
93 +    dashboard_report['NbEvPerRun'] = eventsPerRun
94 +    dashboard_report['NEventsProcessed'] = eventsPerRun
95 +        #print "Total number of events:", eventsPerRun
96 + ##
97 +
98      # check if storageStatistics is valid
99      if storageStatistics.find('Storage statistics:') != -1 :
100          # report form: { 'protocol' : { 'action' : [attempted,succedeed,total-size,total-time,min-time,max-time] , ... } , ... }
# Line 87 | Line 103 | def main(argv) :
103          data_fields = data.split(';')
104          for data_field in data_fields:
105              # parse: format protocol/action = attepted/succedeed/total-size/total-time/min-time/max-time
106 +            if data_field == ' ' or not data_field or data_field == '':
107 +               continue
108              key = data_field.split('=')[0].strip()
109              item = data_field.split('=')[1].strip()
110              protocol = str(key.split('/')[0].strip())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines