Commit 6b2d6d04 authored by GROUAZEL's avatar GROUAZEL

add logs to

parent 6d32968e
......@@ -8,8 +8,8 @@ import logging
import sys
import os, socket
from datetime import datetime
import collections
import time
if __name__ == "__main__":
print "start generating Xspec png files"
year = str(
......@@ -26,7 +26,13 @@ if __name__ == "__main__":
nberror = 0
logging.debug('start plot')
cpt = collections.defaultdict(int)
t0 = time.time()
for line in sys.stdin:
cpt['treated_line'] += 1
if cpt['treated_line']%100==0:
elsaped = time.time()-t0'elapsd time %1.1f seconds line=%s success=%s errors=%s',elsaped,cpt['treated_line'],nbsuccess,nberror)
logging.debug('line: %s',line)
#Ignore the first line of errors files
if not line.startswith("FileResume:"):
......@@ -51,3 +57,4 @@ if __name__ == "__main__":
nberror += 1"{} generated successfully, {} not generated".format(nbsuccess, nberror))'all product in error can be find in %s',filesinerror)
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment