Merge "Profiler: don't call trace_cls if profiler is not enabled"
This commit is contained in:
commit
7b428a9aac
@ -125,7 +125,8 @@ class Service(service.Service):
|
||||
self.topic = topic
|
||||
self.manager_class_name = manager
|
||||
manager_class = importutils.import_class(self.manager_class_name)
|
||||
manager_class = profiler.trace_cls("rpc")(manager_class)
|
||||
if CONF.profiler.profiler_enabled:
|
||||
manager_class = profiler.trace_cls("rpc")(manager_class)
|
||||
|
||||
self.manager = manager_class(host=self.host,
|
||||
service_name=service_name,
|
||||
|
@ -247,7 +247,8 @@ class VolumeManager(manager.SchedulerDependentManager):
|
||||
host=self.host,
|
||||
is_vol_db_empty=vol_db_empty)
|
||||
|
||||
self.driver = profiler.trace_cls("driver")(self.driver)
|
||||
if CONF.profiler.profiler_enabled:
|
||||
self.driver = profiler.trace_cls("driver")(self.driver)
|
||||
try:
|
||||
self.extra_capabilities = jsonutils.loads(
|
||||
self.driver.configuration.extra_capabilities)
|
||||
|
Loading…
Reference in New Issue
Block a user