本文介绍了Traceview最大记录时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Debug.startMethodTracing和Debug.stopMethodTracing优化一块code大约需要30秒来执行,但是当我打开跟踪文件,跟踪视图只显示我的跟踪数据约6.5 secondes。
I am using Debug.startMethodTracing and Debug.stopMethodTracing to optimize a piece of code that takes about 30 sec to execute but when I open the trace file with trace view it only shows me about 6.5 secondes of trace data.
任何线索?
推荐答案
功能 startMethodTracing
默认情况下只记录跟踪数据8MB。为了获得更长的痕迹,第二个参数设置为你希望它来记录(以字节为单位)的最大跟踪大小。
The function startMethodTracing
by default only logs 8MB of trace data. To get a longer trace, set the second parameter to the maximum trace size you want it to record (in bytes).
startMethodTracing("mytrace", 100000000);
这篇关于Traceview最大记录时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!