Skip to content

Commit

Permalink
Clock how long each target takes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Feb 3, 2014
1 parent 99a9d4a commit 4a580b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bugwarrior/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def _aggregate_issues(args):
# Unpack arguments
conf, target = args

start = time.time()

try:
# By default, we don't shorten URLs
shorten = lambda url: url
Expand Down Expand Up @@ -203,7 +205,8 @@ def _aggregate_issues(args):
log.name(target).trace('error').critical("worker failure")
return WORKER_FAILURE
finally:
log.name(target).info("Done with [%s]" % target)
duration = time.time() - start
log.name(target).info("Done with [%s] in %fs" % (target, duration))

# Import here so that mproc knows about _aggregate_issues
import multiprocessing
Expand Down

0 comments on commit 4a580b7

Please sign in to comment.