Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Traceview maximum record time?

Tags:

android

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.

Any clues ?

like image 372
Regis St-Gelais Avatar asked Apr 01 '11 20:04

Regis St-Gelais


1 Answers

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);
like image 140
Brad Avatar answered Sep 18 '22 20:09

Brad