Skip to content

Commit

Permalink
added runtime to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
timothydmorton committed Apr 11, 2015
1 parent 4347f73 commit 5995799
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/starfit
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ matplotlib.use('agg')

import os, os.path, re, sys
import logging
import time

from configobj import ConfigObj
import argparse
Expand Down Expand Up @@ -83,6 +84,7 @@ if __name__=='__main__':
logger = initLogging(logfile, logger)

try:
start = time.time()
ini_file = os.path.join(folder, 'star.ini')
config = ConfigObj(ini_file)

Expand All @@ -100,7 +102,9 @@ if __name__=='__main__':
mod.triangle_plots(triangle_base)
mod.save_hdf(os.path.join(folder, model_filename))

logger.info('starfit calculation successfully completed for {}.'.format(folder))
end = time.time()
logger.info('starfit successful for ' +
'{} in {:.1f} minutes.'.format(folder, (start-end)/60))
except KeyboardInterrupt:
logger.error('starfit calculation interrupted for {}.'.format(folder))
raise
Expand Down

0 comments on commit 5995799

Please sign in to comment.