10586: Suppress stack traces for expected http errors.
[arvados.git] / sdk / python / tests / performance / test_a_sample.py
index aa35813b03c151290f8e7dd18917c45fd6509cf6..dff098403dfffbba967b63c67702e7d27251c507 100644 (file)
@@ -1,10 +1,15 @@
 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'