bin/cubicweb-ctl
author David Douard <david.douard@logilab.fr>
Mon, 13 Nov 2017 16:08:58 +0100
changeset 12302 0d474f888f4a
parent 12253 9165f4b7426b
child 12779 44147dab9d27
permissions -rwxr-xr-x
[statsd] add a statsd_timethis context manager This context manager allows to report to statsd the execution time of any piece of code, without the need for it to be a function or a method, like:: def some_function(): do_stuff() with statsd_timethis('some context message'): do_that() ensure_this()

#!/usr/bin/env python
from cubicweb.cwctl import run
run()