bob icon indicating copy to clipboard operation
bob copied to clipboard

Avoid Stopwatch start_new if log level is higher than trace

Open ikopylov opened this issue 3 years ago • 0 comments

This is a micro optimization. There are several places, where Stopwatch is used and the time measurement goes only to logs on trace level. Examples: https://github.com/qoollo/bob/blob/master/bob/src/server.rs#L112 https://github.com/qoollo/bob/blob/master/bob/src/grinder.rs#L82 https://github.com/qoollo/bob/blob/master/bob-backend/src/core.rs#L242

In this places we can avoid Stopwatch start if log level is higher than trace

ikopylov avatar Aug 28 '22 11:08 ikopylov