diff options
author | Marc-André Lemburg <mal@egenix.com> | 2006-06-13 17:04:26 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2006-06-13 17:04:26 (GMT) |
commit | 08de1ef8dfe06680efdbf620b40904e755a60f42 (patch) | |
tree | 711b7ea5cbaa21e8cecfe601cd818f44c7e1fdf3 /Tools/pybench/pybench-2.0/Imports.py | |
parent | 317af10569c585dd90f8c1f161a6264f539a16e3 (diff) | |
download | cpython-08de1ef8dfe06680efdbf620b40904e755a60f42.zip cpython-08de1ef8dfe06680efdbf620b40904e755a60f42.tar.gz cpython-08de1ef8dfe06680efdbf620b40904e755a60f42.tar.bz2 |
Update pybench to version 2.0.
Diffstat (limited to 'Tools/pybench/pybench-2.0/Imports.py')
-rw-r--r-- | Tools/pybench/pybench-2.0/Imports.py | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/Tools/pybench/pybench-2.0/Imports.py b/Tools/pybench/pybench-2.0/Imports.py new file mode 100644 index 0000000..afc728b --- /dev/null +++ b/Tools/pybench/pybench-2.0/Imports.py @@ -0,0 +1,138 @@ +from pybench import Test + +# First imports: +import os +import package.submodule + +class SecondImport(Test): + + version = 2.0 + operations = 5 * 5 + rounds = 40000 + + 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 + + +class SecondPackageImport(Test): + + version = 2.0 + operations = 5 * 5 + rounds = 40000 + + 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 + +class SecondSubmoduleImport(Test): + + version = 2.0 + operations = 5 * 5 + rounds = 40000 + + 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 |