Skip to content

Commit

Permalink
Log total execution time to info
Browse files Browse the repository at this point in the history
  • Loading branch information
Thor77 committed Mar 24, 2017
1 parent a83d6de commit e4212f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tsstats/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import argparse
import json
import logging
from os.path import abspath, exists, isdir, join as pathjoin
from os.path import join as pathjoin
from os.path import abspath, exists, isdir
from time import time

from tsstats import config
from tsstats.exceptions import InvalidConfiguration
Expand Down Expand Up @@ -72,6 +74,7 @@ def cli():


def main(configuration):
start_time = time()
# setup logging
if configuration.getboolean('General', 'debug'):
logger.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -113,6 +116,7 @@ def main(configuration):
onlinetime_threshold=int(configuration.get(
'General', 'onlinetimethreshold'))
)
logger.info('Finished after %s seconds', time() - start_time)


if __name__ == '__main__':
Expand Down

0 comments on commit e4212f2

Please sign in to comment.