Stay organized with collections
Save and categorize content based on your preferences.
CircularAtraceUtil
public
class
CircularAtraceUtil
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.CircularAtraceUtil
|
An atrace utility developed primarily for identifying the root causes of ANRs during Monkey
testing. Invoking the start command will start asynchronously monitoring the tagged traces in a
circular buffer. Invoking stop will dump the contents of the buffer into an InputStreamSource
that it returns.
To use this for the case mentioned above (identifying ANRs), one has to first implement the start
method at the beginning of the test and the end method immediately at the end of the test. From
here one can choose how to store and handle the data. Most should probably use the systrace
with the --from-file option to generate an HTML viewer.
Summary
Public constructors
CircularAtraceUtil
public CircularAtraceUtil ()
Public methods
endTrace
public static FileInputStreamSource endTrace (ITestDevice device)
Stops and dumps atrace asynchronously into a File, which it returns in an InputStreamSource.
Parameters |
device |
ITestDevice |
startTrace
public static void startTrace (ITestDevice device,
tags,
int bufferSizeMB)
Starts atrace asynchronously with the tags specified.
Parameters |
device |
ITestDevice : the device whose actions will be monitored |
tags |
: tags that atrace should monitor; defaults to 'am gfx sched view' |
bufferSizeMB |
int : the circular buffers size in MB |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]