Skip to content
Snippets Groups Projects

add link to logs

Merged Maciej Pawel Szymanski requested to merge maszyman-logs-throughput into master
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
@@ -85,6 +85,14 @@ class ThroughputProfileHandler(BaseHandler):
#else:
trend_url=""
# concatenate log files into one file
with open('tests.log', 'w') as outfile:
for fname in files:
outfile.write(" "*80+"\n"+"="*80+"\n"+fname+"\n"+"="*80+"\n"+" "*80+"\n")
with open(fname) as infile:
for line in infile:
outfile.write(line)
html_code = "<html>"\
"<head></head> "\
"<body> "\
@@ -96,6 +104,7 @@ class ThroughputProfileHandler(BaseHandler):
"<ul>"\
" <li>Throughput = "+str(throughput)+" Events/s"+"</li>"\
" <li><a href="+trend_url+">Trend plot</a></li>"\
" <li><a href='https://cern.ch/lhcbpr-hlt/PerfTests/UpgradeVelo/"+dirname+"/tests.log'>Logs</a></li>"\
"</ul>"\
"<object type=\"image/svg+xml\" data=\"flamy.svg\"></object>"\
"<p>The x-axis shows the stack profile population, sorted alphabetically (it is not the passage of time), and the y-axis shows stack depth, "\
@@ -118,6 +127,7 @@ class ThroughputProfileHandler(BaseHandler):
try:
subprocess.call(['xrdcp', os.path.join(directory,'flamy.svg'), targetRootEosDir + "/flamy.svg"])
subprocess.call(['xrdcp', 'index.html', targetRootEosDir + "/index.html"])
subprocess.call(['xrdcp', 'tests.log', targetRootEosDir + "/tests.log"])
except Exception, ex:
logging.warning('Error copying html files to eos: %s', ex)
Loading