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