Systers Community

(Part 1 of 2) Generate multiple Trace Logs by Instrumenting Powerup app

Prerequisite

Steps

  • Instrument your app:
    • To create trace logs, call startMethodTracing() where you want the system to start logging tracing data.
    • In the call, specify the name for the .trace file, and the system saves it to a package-specific directory that's intended for persistent app data on the target device. This file contains the binary method trace data and a mapping table with thread and method names. To stop tracing, call stopMethodTracing().
  • Save multiple logs: To save multiple trace logs to your device, dynamically rename the trace log each time your app calls startMethodTracing().
  • Access trace logs using File exploree: To open the Device File Explorer, click View > Tool Windows > Device File Explorer (or click the Device File Explorer button in the tool window bar). Locate the .trace files by navigating to your app's package-specific directory.
  • Copy the file to your local machine using the "adb pull" command.

Work Submission

  • Submit atleast 3 trace files along with sample starts and stops recording files.
  • Continue to (Part 2 of 2) of this task AFTER work is completed.

Resources

Task tags

  • trace generation
  • tetsing

Students who completed this task

Yuyuan Luo, Valentun, Aryaman Agrawal

Task type

  • done_all Quality Assurance
close

2017