loguru icon indicating copy to clipboard operation
loguru copied to clipboard

How to output the runtime of an interface or method?

Open jaxonister opened this issue 3 years ago • 4 comments

How to output the runtime of an interface or method?

jaxonister avatar Aug 03 '22 04:08 jaxonister

Please clarify your question.

Delgan avatar Aug 03 '22 07:08 Delgan

I want to record the running time of each method and the processing time of the interface. Does loguru support it?

jaxonister avatar Aug 04 '22 09:08 jaxonister

I want to check system response time, processing time by doing something like this

jaxonister avatar Aug 04 '22 09:08 jaxonister

This is not available out of the box, you'll need to implement a decorator like this one: Logging entry and exit of functions with a decorator.

Delgan avatar Aug 04 '22 16:08 Delgan