Add hide_args=True to @profiler.trace() where it may cause problems

* Without hide_args=True parameter @profiler.trace() works much
  slower because it gets string representation of decorated method
  parameters internally. Adding it slightly improves performance.

Change-Id: I75a8fecd2e37b1d25c6f70501711e709c2d2ae25
This commit is contained in:
Renat Akhmerov
2017-05-12 15:22:46 +07:00
parent 2a2c8e733b
commit 2c6737b74c
4 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ from mistral.workflow import states
LOG = logging.getLogger(__name__)
@profiler.trace('wf-controller-get-controller')
@profiler.trace('wf-controller-get-controller', hide_args=True)
def get_controller(wf_ex, wf_spec=None):
"""Gets a workflow controller instance by given workflow execution object.
@@ -85,7 +85,7 @@ class WorkflowController(object):
self.wf_spec = wf_spec
@profiler.trace('workflow-controller-continue-workflow')
@profiler.trace('workflow-controller-continue-workflow', hide_args=True)
def continue_workflow(self, task_ex=None):
"""Calculates a list of commands to continue the workflow.