2006-04-19 12:27:33 -03:00
|
|
|
from pybench import Test
|
|
|
|
|
|
|
|
# First imports:
|
|
|
|
import os
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
class SecondImport(Test):
|
|
|
|
|
2006-06-13 15:56:56 -03:00
|
|
|
version = 2.0
|
2006-04-19 12:27:33 -03:00
|
|
|
operations = 5 * 5
|
2006-06-13 15:56:56 -03:00
|
|
|
rounds = 40000
|
2006-04-19 12:27:33 -03:00
|
|
|
|
|
|
|
def test(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
def calibrate(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
pass
|
2006-04-21 13:34:54 -03:00
|
|
|
|
2006-04-19 12:27:33 -03:00
|
|
|
|
|
|
|
class SecondPackageImport(Test):
|
|
|
|
|
2006-06-13 15:56:56 -03:00
|
|
|
version = 2.0
|
2006-04-19 12:27:33 -03:00
|
|
|
operations = 5 * 5
|
2006-06-13 15:56:56 -03:00
|
|
|
rounds = 40000
|
2006-04-19 12:27:33 -03:00
|
|
|
|
|
|
|
def test(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
import package
|
|
|
|
|
|
|
|
def calibrate(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
pass
|
2006-04-21 13:34:54 -03:00
|
|
|
|
2006-04-19 12:27:33 -03:00
|
|
|
class SecondSubmoduleImport(Test):
|
|
|
|
|
2006-06-13 15:56:56 -03:00
|
|
|
version = 2.0
|
2006-04-19 12:27:33 -03:00
|
|
|
operations = 5 * 5
|
2006-06-13 15:56:56 -03:00
|
|
|
rounds = 40000
|
2006-04-19 12:27:33 -03:00
|
|
|
|
|
|
|
def test(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
import package.submodule
|
|
|
|
|
|
|
|
def calibrate(self):
|
|
|
|
|
|
|
|
for i in xrange(self.rounds):
|
|
|
|
pass
|