From 093d60d9541d0d335da515f18630919a257b33c1 Mon Sep 17 00:00:00 2001 From: Adam Harwell Date: Thu, 5 Apr 2018 07:44:50 +0900 Subject: [PATCH] Add debug timing logging to amphora health update Change-Id: I39079ca91331dc0cbca5c0e4dd3a2ea18e1271d4 --- octavia/controller/healthmanager/health_drivers/update_db.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/octavia/controller/healthmanager/health_drivers/update_db.py b/octavia/controller/healthmanager/health_drivers/update_db.py index 0c7f939395..94fb08ef2f 100644 --- a/octavia/controller/healthmanager/health_drivers/update_db.py +++ b/octavia/controller/healthmanager/health_drivers/update_db.py @@ -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):