Lab
Android :: TimingLogger 사용법
threeword
2012. 5. 28. 23:32
http://developer.android.com/reference/android/util/TimingLogger.html
A utility class to help log timings splits throughout a method call. Typical usage is:
TimingLogger timings = new TimingLogger(TAG, "methodA");
// ... do some work A ...
timings.addSplit("work A");
// ... do some work B ...
timings.addSplit("work B");
// ... do some work C ...
timings.addSplit("work C");
timings.dumpToLog();
The dumpToLog call would add the following to the log:
D/TAG ( 3459): methodA: begin
D/TAG ( 3459): methodA: 9 ms, work A
D/TAG ( 3459): methodA: 1 ms, work B
D/TAG ( 3459): methodA: 6 ms, work C
D/TAG ( 3459): methodA: end, 16 ms
위 경로의 API 문서에 예제가 같이 사용하면 된다고 나와있다.
하지만 아무리 해도 로그캣에 로그는 보이지 않는다...
로그를 보려면....
Which I did through adb shell
:
$ adb shell
# setprop
usage: setprop <key> <value>
# setprop log.tag.MyTag VERBOSE
#