Closed yogurtearl closed 8 years ago
What about always doing it for annotated methods? Too much?
From a quick glance at the code, it looks like Trace is low overhead when you are not actively tracing: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/Trace.java
So always-on Trace'ing for @DebugLog might be OK. If it becomes a performance issue, can always add a way disable it later.
Want to send a PR? Otherwise I can do it at some point in the next week or two.
@JakeWharton, I updated the previous PR. It is always enabled now. https://github.com/JakeWharton/hugo/pull/100
Merged. Will squeeze out a release in the next two weeks.
Not sure if this is in the scope of Hugo, but have an annotation for wrapping methods in Trace.beginSection/endSection would be very helpful.
Maybe a parameter to @DebugLog? @DebugLog(trace=true) Maybe a separate annotation ( @DebugTrace ) ?
output would function like: