diff options
author | Lars Wirzenius <liw@xander> | 2011-02-04 22:08:50 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@xander> | 2011-02-04 22:08:50 +0200 |
commit | 4f855b71e11646da6d95bc2e081bd4083cf20a5a (patch) | |
tree | 8b01003e910048f0ed3ea0ff284372a59b62cf77 | |
parent | ed28708bd80bfd298dcbbb9100d4c9f7c34f9bc5 (diff) | |
download | python-tracing-4f855b71e11646da6d95bc2e081bd4083cf20a5a.tar.gz |
Add more measurements.
-rwxr-xr-x | speed-test | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -2,7 +2,26 @@ set -e +measure() { python -m timeit \ -s 'import logging, tracing' \ -s 'logging.basicConfig(filename="/dev/null")' \ - 'tracing.trace("foo: %s" % "bar")' + -s "$1" \ + -s ' +class Foo(object): + def foo(self): + tracing.trace("%s" % "bar") +f = Foo() +' \ + 'f.foo()' + +} + +echo Without patterns +measure "pass" + +echo With unmatching pattern +measure 'tracing.trace_add_pattern("yikes")' + +echo With matching pattern +measure 'tracing.trace_add_pattern("timeit-src")' |