Browse Source

Log duration of local tenant layout update

Similar to the reconfiguration, log the time it takes for a scheduler to
update the local layout of a tenant.

Change-Id: I6e59684374bbdac282b8c7bf424498e242a9d295
changes/87/825087/2 4.12.0
Simon Westphahl 4 months ago committed by James E. Blair
parent
commit
1ed1861089
  1. 5
      zuul/scheduler.py

5
zuul/scheduler.py

@ -1075,6 +1075,7 @@ class Scheduler(threading.Thread):
self.connections, self.zk_client, self.globals, self.statsd, self,
self.merger, self.keystore)
with self.layout_lock:
start = time.monotonic()
log.debug("Updating local layout of tenant %s ", tenant_name)
layout_state = self.tenant_layout_state.get(tenant_name)
layout_uuid = layout_state and layout_state.uuid
@ -1097,6 +1098,10 @@ class Scheduler(threading.Thread):
with suppress(KeyError):
del self.local_layout_state[tenant_name]
duration = round(time.monotonic() - start, 3)
self.log.info("Local layout update complete for %s (duration: %s "
"seconds)", tenant_name, duration)
def _checkTenantSourceConf(self, config):
tenant_config = None
script = False

Loading…
Cancel
Save