diff options
-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")' |