Difference: CMSLoadTestLHCONEScripts (7 vs. 8)

Revision 82011/05/31 - Main.JamesLetts

Line: 1 to 1
 
META TOPICPARENT name="CMSLoadTestLHCONEResults"

Scripts

Line: 13 to 13
 import xml.dom.minidom from xml.dom.minidom import Node
Changed:
<
<
def GetTransferResults? (fromsite,tosite,nfiles,starttime,delta=86400):
>
>
def GetTransferResults? (fromsite,tosite,nfiles,starttime):
  now=int(time.time())
Changed:
<
<
endtime=int(starttime)+int(delta) if ( endtime > now ) : endtime=now url="https://cmsweb.cern.ch/phedex/datasvc/xml/debug/TransferHistory?from="+fromsite+"&to="+tosite+"&binwidth=300&starttime="+str(starttime)+"&endtime="+str(endtime) print url
>
>
url="https://cmsweb.cern.ch/phedex/datasvc/xml/debug/TransferHistory?from="+fromsite+"&to="+tosite+"&binwidth=300&starttime="+str(starttime)+"&endtime="+str(now)
  xmldata = urllib2.urlopen(url).read() dom = xml.dom.minidom.parseString(xmldata)

done={} fail={}

Added:
>
>
rate={}
  for node in dom.getElementsByTagName('transfer'): done_files=node.attributes["done_files"].value fail_files=node.attributes["fail_files"].value time_bin=node.attributes["timebin"].value
Changed:
<
<
done[time_bin]=done_files fail[time_bin]=fail_files
>
>
done[time_bin]=node.attributes["done_files"].value fail[time_bin]=node.attributes["fail_files"].value rate[time_bin]=node.attributes["rate"].value
  sumdone=0 sumfail=0 lastkey=0
Added:
>
>
maxrate=0. moving_average=[0,0,0,0,0,0,0,0,0,0,0,0]
  for key in sorted(done.iterkeys()):
Added:
>
>
rate_5m=float(str(rate[key])) moving_average.pop(0) moving_average.append(rate_5m) avg_1h=sum(moving_average)/12. if ( avg_1h > maxrate ) : maxrate=avg_1h
  sumdone+=int(str(done[key])) sumfail+=int(str(fail[key])) if ( sumdone >= int(str(nfiles)) ) :
Line: 44 to 52
  if ( int(str(key)) > now ) : break
Deleted:
<
<
url2="https://cmsweb.cern.ch/phedex/datasvc/xml/debug/TransferHistory?from="+fromsite+"&to="+tosite+"&binwidth=3600&starttime="+str(starttime)+"&endtime="+str(lastkey) xmldata2 = urllib2.urlopen(url2).read() dom2 = xml.dom.minidom.parseString(xmldata2) maxrate=0. for node in dom2.getElementsByTagName('transfer'): rate=float(str(node.attributes["rate"].value)) if ( rate > maxrate ) : maxrate=rate
  maxrate/=(1024.*1024) latency=float(int(lastkey)-int(starttime))/3600. if latency < 0 :
Line: 77 to 76
 GetTransferResults? (fromsite,tosite,nfiles,starttime)
Deleted:
<
<
-- JamesLetts - 2011/05/21
 \ No newline at end of file
Added:
>
>
-- JamesLetts - 2011/05/31
 \ No newline at end of file
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback