Log collection time taken
Change-Id: I3a94b70d4cbfa229dfa998d7058792f6ea8db0fa
This commit is contained in:
parent
102e88fab5
commit
07f09a1a9e
@ -111,6 +111,7 @@ class CollectorService(service.Service):
|
|||||||
|
|
||||||
def collect_usage(self):
|
def collect_usage(self):
|
||||||
LOG.info("Starting to collect usage...")
|
LOG.info("Starting to collect usage...")
|
||||||
|
collection_start = datetime.utcnow()
|
||||||
|
|
||||||
if CONF.collector.max_windows_per_cycle <= 0:
|
if CONF.collector.max_windows_per_cycle <= 0:
|
||||||
LOG.info("Finished collecting usage with configuration "
|
LOG.info("Finished collecting usage with configuration "
|
||||||
@ -173,6 +174,9 @@ class CollectorService(service.Service):
|
|||||||
LOG.warning('Get lock failed. Process: %s' % self.identifier)
|
LOG.warning('Get lock failed. Process: %s' % self.identifier)
|
||||||
|
|
||||||
LOG.info("Finished collecting usage for %s projects." % success_count)
|
LOG.info("Finished collecting usage for %s projects." % success_count)
|
||||||
|
collection_end = datetime.utcnow()
|
||||||
|
collection_taken = collection_end - collection_start
|
||||||
|
LOG.info("Collection time was: %ss." % collection_taken.seconds)
|
||||||
|
|
||||||
# If we start distil-collector manually with 'collect_end_time' param
|
# If we start distil-collector manually with 'collect_end_time' param
|
||||||
# specified, the service should be stopped automatically after all
|
# specified, the service should be stopped automatically after all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user