X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ae63accf8df1fdc458603fdf0c259c4bf0f25231..c797b629ddb0cf2808123a1b86d31b0153f1aca0:/sdk/python/tests/performance/test_a_sample.py diff --git a/sdk/python/tests/performance/test_a_sample.py b/sdk/python/tests/performance/test_a_sample.py index aa35813b03..65015dc872 100644 --- a/sdk/python/tests/performance/test_a_sample.py +++ b/sdk/python/tests/performance/test_a_sample.py @@ -1,10 +1,22 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import print_function +from __future__ import absolute_import +from builtins import range import unittest -from performance_profiler import PerformanceProfiler +from .performance_profiler import profiled -class PerformanceTestSample(PerformanceProfiler): - def func(self): - print 'Hello' +class PerformanceTestSample(unittest.TestCase): + def foo(self): + bar = 64 - def test_performance(self): - self.run_profiler('self.func()', 'test_sample') + @profiled + def test_profiled_decorator(self): + j = 0 + for i in range(0,2**20): + j += i + self.foo() + print('Hello')