Merge "Add debug timing logging to amphora health update"

This commit is contained in:
Zuul 2018-04-12 19:08:22 +00:00 committed by Gerrit Code Review
commit 69a45c254b

View File

@ -14,6 +14,7 @@
import datetime
import time
import timeit
from oslo_config import cfg
from oslo_log import log as logging
@ -105,6 +106,7 @@ class UpdateHealthDb(update_base.HealthUpdateBase):
}
"""
start_time = timeit.default_timer()
session = db_api.get_session()
# We need to see if all of the listeners are reporting in
@ -227,6 +229,8 @@ class UpdateHealthDb(update_base.HealthUpdateBase):
)
except sqlalchemy.orm.exc.NoResultFound:
LOG.error("Load balancer %s is not in DB", db_lb.id)
LOG.debug('Health Update finished in: {0} seconds'.format(
timeit.default_timer() - start_time))
def _process_pool_status(self, session, db_pool, pools, lb_status,
processed_pools):