Merge "Log how long power sync and sensor collections take"
This commit is contained in:
@@ -1594,6 +1594,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
|||||||
def _sync_power_states(self, context):
|
def _sync_power_states(self, context):
|
||||||
"""Periodic task to sync power states for the nodes."""
|
"""Periodic task to sync power states for the nodes."""
|
||||||
filters = {'maintenance': False}
|
filters = {'maintenance': False}
|
||||||
|
started = time.time()
|
||||||
|
|
||||||
# NOTE(etingof): prioritize non-responding nodes to fail them fast
|
# NOTE(etingof): prioritize non-responding nodes to fail them fast
|
||||||
nodes = sorted(
|
nodes = sorted(
|
||||||
@@ -1634,8 +1635,9 @@ class ConductorManager(base_manager.BaseConductorManager):
|
|||||||
'ConductorManager.PowerSyncNodesCount',
|
'ConductorManager.PowerSyncNodesCount',
|
||||||
len(nodes))
|
len(nodes))
|
||||||
|
|
||||||
LOG.debug('Completed power state sync operation, evaluated %s '
|
LOG.debug('Completed power state sync operation, evaluated %d '
|
||||||
'nodes.', len(futures))
|
'nodes with %d workers in %.2f seconds',
|
||||||
|
len(futures), number_of_workers, time.time() - started)
|
||||||
|
|
||||||
def _sync_power_state_nodes_task(self, context, nodes):
|
def _sync_power_state_nodes_task(self, context, nodes):
|
||||||
"""Invokes power state sync on nodes from synchronized queue.
|
"""Invokes power state sync on nodes from synchronized queue.
|
||||||
@@ -2934,6 +2936,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
|||||||
if not CONF.sensor_data.enable_for_undeployed_nodes:
|
if not CONF.sensor_data.enable_for_undeployed_nodes:
|
||||||
filters['provision_state'] = states.ACTIVE
|
filters['provision_state'] = states.ACTIVE
|
||||||
|
|
||||||
|
started = time.time()
|
||||||
nodes = queue.Queue()
|
nodes = queue.Queue()
|
||||||
for node_info in self.iter_nodes(fields=['instance_uuid'],
|
for node_info in self.iter_nodes(fields=['instance_uuid'],
|
||||||
filters=filters):
|
filters=filters):
|
||||||
@@ -2959,6 +2962,9 @@ class ConductorManager(base_manager.BaseConductorManager):
|
|||||||
if not_done:
|
if not_done:
|
||||||
LOG.warning("%d workers for send sensors data did not complete",
|
LOG.warning("%d workers for send sensors data did not complete",
|
||||||
len(not_done))
|
len(not_done))
|
||||||
|
LOG.debug('Completed sending sensor data, evaluated %d '
|
||||||
|
'nodes with %d workers in %.2f seconds',
|
||||||
|
len(done), number_of_threads, time.time() - started)
|
||||||
|
|
||||||
def _filter_out_unsupported_types(self, sensors_data):
|
def _filter_out_unsupported_types(self, sensors_data):
|
||||||
"""Filters out sensor data types that aren't specified in the config.
|
"""Filters out sensor data types that aren't specified in the config.
|
||||||
|
Reference in New Issue
Block a user