Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 16 lines (13 sloc) 0.507 kB
2a37981 @mitsuhiko Docstrings for benchmarks
authored
1 """Tests basic stack manipulation performance"""
2290ac7 @mitsuhiko Added benchmark tests
authored
2 from logbook import Handler, NullHandler, StreamHandler, FileHandler, \
3 ERROR, WARNING
4 from tempfile import NamedTemporaryFile
5 from cStringIO import StringIO
6
7
8 def run():
9 f = NamedTemporaryFile()
10 out = StringIO()
11 with NullHandler():
12 with StreamHandler(out, level=WARNING):
13 with FileHandler(f.name, level=ERROR):
14 for x in xrange(100):
15 list(Handler.stack_manager.iter_context_objects())
Something went wrong with that request. Please try again.