diff options
author | Dina Belova <dbelova@mirantis.com> | 2016-02-05 12:04:01 -0800 |
---|---|---|
committer | Boris Pavlovic <boris@pavlovic.me> | 2016-02-06 00:13:24 +0000 |
commit | 2d57f411a3b9b0fa62eff46ecde724ef92787402 (patch) | |
tree | 885b16a0b9a1e05512b38551eaede727bd74c778 | |
parent | 50832595d6e70db722cf26eb581277535ba2068d (diff) | |
download | osprofiler-2d57f411a3b9b0fa62eff46ecde724ef92787402.tar.gz |
Disable staticmethods tracing1.0.1
This tracing case has variety of corner cases, that need to
be treated separately. Let's skip staticmethods tracing until
this research willl be done.
Change-Id: I3effc9b9bf1ab3922d837cefe7ea472d9eedd6af
-rw-r--r-- | osprofiler/profiler.py | 5 | ||||
-rw-r--r-- | osprofiler/tests/test_profiler.py | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/osprofiler/profiler.py b/osprofiler/profiler.py index f7a880e..1764184 100644 --- a/osprofiler/profiler.py +++ b/osprofiler/profiler.py @@ -166,7 +166,10 @@ def trace_cls(name, info=None, hide_args=False, trace_private=False): wrapped_method = trace(name, info=info, hide_args=hide_args)(attr) if isinstance(wrapped_obj, staticmethod): - wrapped_method = staticmethod(wrapped_method) + # FIXME(dbelova): tracing staticmethod is prone to issues, + # there are lots of edge cases, so let's figure that out later. + continue + # wrapped_method = staticmethod(wrapped_method) elif isinstance(wrapped_obj, classmethod): wrapped_method = classmethod(wrapped_method) setattr(cls, attr_name, wrapped_method) diff --git a/osprofiler/tests/test_profiler.py b/osprofiler/tests/test_profiler.py index 7f86f8d..d5a2b8a 100644 --- a/osprofiler/tests/test_profiler.py +++ b/osprofiler/tests/test_profiler.py @@ -336,6 +336,9 @@ class TraceClsDecoratorTestCase(test.TestCase): @mock.patch("osprofiler.profiler.stop") @mock.patch("osprofiler.profiler.start") + @test.testcase.skip( + "Static method tracing was disabled due the bug. This test should be " + "skipped until we find the way to address it.") def test_static(self, mock_start, mock_stop): fake_cls = FakeTraceStatic() |