omero.util.decorators module¶
OMERO Decorators
- class util.decorators.TimeIt(level=10, name=None)[source]¶
Bases:
object
Decorator to measure the execution time of a function. Assumes that a logger global var is available and is the logger instance from
logging.getLogger()
.@param level: the level to use for logging @param name: the name to use when logging, function name is used if None
- logger = <Logger omero.timeit (WARNING)>¶
- util.decorators.locked(func)[source]¶
Decorator for using the self._lock argument of the calling instance
- util.decorators.remoted(func)[source]¶
Decorator for catching any uncaught exception and converting it to an InternalException