diff options
author | R. Tyler Ballance <tyler@monkeypox.org> | 2009-10-14 22:36:59 -0700 |
---|---|---|
committer | R. Tyler Ballance <tyler@monkeypox.org> | 2009-10-14 22:36:59 -0700 |
commit | e0df2a214f6404b41073127ed4b8b52cbb1f6380 (patch) | |
tree | aa5a27816ec30ef67f90ff70fa1f8a075691603e /cheetah/Tests | |
parent | e8d6782076e0d582d0090c7cef6239f6d72efcd0 (diff) | |
download | python-cheetah-e0df2a214f6404b41073127ed4b8b52cbb1f6380.tar.gz |
Add a simple test to help judge perfomance of DummyTransaction.write()
Diffstat (limited to 'cheetah/Tests')
-rw-r--r-- | cheetah/Tests/Performance.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cheetah/Tests/Performance.py b/cheetah/Tests/Performance.py index 3dcd8c5..8101e85 100644 --- a/cheetah/Tests/Performance.py +++ b/cheetah/Tests/Performance.py @@ -123,6 +123,23 @@ class DynamicMethodCompilationTest(PerformanceTest): template = template() value = template.testMethod() + +class BunchOfWriteCalls(PerformanceTest): + iterations = 1000 + def performanceSample(self): + template = ''' + #import sys + #import os + #for i in xrange(1000) + $i + #end for + ''' + template = Cheetah.Template.Template.compile(template, + keepRefToGeneratedCode=False) + template = template() + value = template.respond() + del value + class DynamicSimpleCompilationTest(PerformanceTest): def performanceSample(self): template = ''' |