2014-05-05 02:17:13 +03:00
|
|
|
import bench
|
|
|
|
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
class Foo:
|
2014-05-05 02:17:13 +03:00
|
|
|
def __init__(self):
|
|
|
|
self._num = 20000000
|
|
|
|
|
|
|
|
def num(self):
|
|
|
|
return self._num
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2014-05-05 02:17:13 +03:00
|
|
|
def test(num):
|
|
|
|
o = Foo()
|
|
|
|
i = 0
|
|
|
|
while i < o.num():
|
|
|
|
i += 1
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2014-05-05 02:17:13 +03:00
|
|
|
bench.run(test)
|