Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using systrace in application code android

The documentation in android says

you can use the methods of the Trace class to add instrumentation to 
your application code and see the results in a Systrace report.

I have added the below methods to my code

Trace.beginSection("test-trace");  

// block of code

Trace.endSection();

Now where can I check the results of this section. I start the systrace tool from the android device monitor and recorded it for 30 secs(performed the button click that executes the above the block). It generates the trace.html file but how do i get the above section information from this html file

like image 946
Revanth Gopi Avatar asked May 10 '15 08:05

Revanth Gopi


People also ask

How do I open a Systrace file?

Open both Perfetto files and Systrace files in the Perfetto UI. Open Systrace files with the legacy Systrace viewer in the Perfetto UI (use the Open with legacy UI link). Convert a Perfetto trace to the legacy Systrace text format using the traceconv tool.

Is system tracing app spyware?

A new malicious application that steals user data, monitors movements, and actively searches online history has been discovered. This app pretends to update the android phone but, in reality, it serves as a giant spyware program. Do not download this Android app called "System Update."


Video Answer


1 Answers

It is there, I myself searched for it about one hour :D

If you have only one thread, it's shown in UI thread row, otherwise it's shown in your-defined thread row.

If you can not find it, use the search toolbox, in top right corner of page, type 'test-trace' there and it will show you the start time of that in detail

:)

this screenshot may help you

like image 52
Parissa Kalaee Avatar answered Oct 17 '22 04:10

Parissa Kalaee