Automated acquisition of application performance data using ADB in the Android system

Source: Internet
Author: User

"Automated test Mode"

Supports starting and running in the form of adb shell commands. Note that the Office family software may change the characters in the command, causing the command to be unavailable! Please enter the command manually, or copy it from the accompanying command.txt text.

1. Start Home

ADB shell am start-a android.intent.action.main-c android.intent.category.launcher-n iflytek.testtech.androidpropertytool/. Mainac

2. Open Monitoring

Execute the following two commands in turn, taking care to replace the Scarlet Letter section:

ADB shell am broadcast-a monitorstart--es monitor cpu,pss,upflow,downflow,battery--es pkg com.example.test--es Interva L 5

ADB shell am broadcast-a changedir--es savedir handtest

Monitor: Monitored objects (CPU, PSS memory, upload traffic, download traffic, battery)

PKG: Package Name

Interval: interval (seconds)

3. End Monitoring

ADB shell am broadcast-a monitorfinish

4. View data files

The data exists in the external storage space of Android (generally referred to as the/sdcard directory)

For example:

/sdcard/androidpropertytool/xxx/handtest/cup.txt

/sdcard/androidpropertytool/xxx/handtest/pss.txt

/sdcard/androidpropertytool/xxx/handtest/upflow.txt

/sdcard/androidpropertytool/xxx/handtest/downflow.txt

/sdcard/androidpropertytool/xxx/handtest/battery.txt

/sdcard/androidpropertytool/xxx/handtest/cpusystem.txt

/sdcard/androidpropertytool/xxx/handtest/psssystemleft.txt

where "XXX" is the package name of the app being tested.

Note: The old data file is saved in a time-stamped directory, for example:

/sdcard/androidpropertytool/xxx-2014-08-01-14-43-43-029/handtest/cpu.txt, if not required, please delete it manually.

Automated acquisition of application performance data using ADB in the Android system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.