以下是systrace生成的html文件的一部分。这里我想要Listview的开始时间和结束时间或者进程的ListView的直接加载时间。我可以看到我在浏览器中打开html文件的时间,但是如何自动从文本文件中读取它?
与Listview相关的html文件的一部分:
com.android.mms-13964 [000] ...1 35840.273806: tracing_mark_write: B|13964|ListView\n\
Binder_5-1377 [001] d..4 35840.273906: sched_wakeup: comm=logd.writer pid=323 prio=120 success=1 target_cpu=001\n\
com.android.mms-13964 [000] d.h6 35840.274840: sched_wakeup: comm=hwcVsyncThread pid=798 prio=111 success=1 target_cpu=000\n\
com.android.mms-13964 [000] ...2 35840.274860: sched_switch: prev_comm=com.android.mms prev_pid=13964 prev_prio=120 prev_state=R ==> next_comm=hwcVsyncThread next_pid=798 next_prio=111\n\
<idle>-0 [002] d.h4 35840.274898: sched_wakeup: comm=DispSync pid=706 prio=98 success=1 target_cpu=002\n\
<idle>-0 [002] ...2 35840.274915: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=DispSync next_pid=706 next_prio=98\n\
hwcVsyncThread-798 [000] ...1 35840.274928: tracing_mark_write: C|286|HW_VSYNC_0|0\n\
DispSync-706 [002] ...1 35840.274959: tracing_mark_write: C|286|VSYNC-app|0\n\
DispSync-706 [002] d..4 35840.274970: sched_wakeup: comm=EventThread pid=831 prio=98 success=1 target_cpu=001\n\
hwcVsyncThread-798 [000] ...2 35840.274973: sched_switch: prev_comm=hwcVsyncThread prev_pid=798 prev_prio=111 prev_state=S ==> next_comm=com.android.mms next_pid=13964 next_prio=120\n\
Binder_5-1377 [001] ...2 35840.274980: sched_switch: prev_comm=Binder_5 prev_pid=1377 prev_prio=120 prev_state=R ==> next_comm=EventThread next_pid=831 next_prio=98\n\
DispSync-706 [002] ...2 35840.275013: sched_switch: prev_comm=DispSync prev_pid=706 prev_prio=98 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120\n\
EventThread-831 [001] d..5 35840.275043: sched_wakeup: comm=android.display pid=915 prio=116 success=1 target_cpu=001\n\
EventThread-831 [001] d..5 35840.275060: sched_wakeup: comm=equicksearchbox pid=1661 prio=120 success=1 target_cpu=002\n\
<idle>-0 [002] ...2 35840.275071: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==>