Android Performance data Acquisition "Go"

Source: Internet
Author: User

No need to install any performance monitoring tools, directly following access, to help complete the performance data acquisition and review.  android apk size, apk start time, traffic, power, CPU run time, memory, actvity switch time, and more.   android Performance Data acquisition::    /proc/self/net/dev  : eth0 and rmnet0 corresponding data and  result-eg:     inter-|   Receive                               &N Bsp                |  transmit face |bytes    packets errs drop FIFO frame compressed multicast|bytes    packets Errs drop FIFO colls carrier compressed    LO:    2304      32    0   & Nbsp;0    0     0          0         0     2304    0    0    0     0       0          0   eth0:  122801    1712    0    0     0     0          0         0   232055    1399 &nbsp ;  0    0    0     0       0          0  sit 0:       0       0    0    0    0     0   &NBSP ;      0         0        0       0    0 &NB Sp  0    0     0       0          0        apk info:     commands: AAPT d badging   available: PackageName, Versioncode, launchactivity---- For later start-up time and other parameters use  result-eg:    package:name= ' Com.taobao.taobao ' versioncode= ' versionname= ' 3.3.1 ' Launchable-activity:name= ' com.taobao.tao.Welcome '  # power information and CPU hours     command: adb shell Dumpsys Batteryinfo & The Nbsp;packagename result contains the following data: Network---REceived and send size; Wake lock window: The length of time the screen wakes up, sensor: the length of time the CPU is running (including the length of each child process, background service, etc.)  result-eg:  #10109:     NETWORK:10.81MB received, 118.94KB sent    Wake lock window:7s 232ms window (2 times) REALTIME&N Bsp   Sensor 0:1m 31s 22ms Realtime (Times)     Proc com.taobao.taobao:      cpu:1m 46s 270m s usr + 27s 410ms krn      proc starts    proc com.taobao.taobao:taobao_remote:    & nbsp cpu:4s 220ms usr + 640ms krn      2 proc starts    proc com.taobao.taobao:remote:    & nbsp cpu:530ms usr + 430ms krn      2 proc starts    APK com.taobao.taobao:      Servi Ce com.taobao.tao.wwmessageservice:        Created for:45m 40s 653ms  uptime        Starts:2, launches:2  #客户端启动时间获取:    command: adb logcat-c && adb logcat-s Activitymanager | grep   "Displayed "  can get the switching time to actvity, which can get to launch activity corresponding time-----that is apk boot time.  result-eg:    line 1387:i/activitymanager ( ): Displayed activity com.taobao.taobao/ com.taobao.tao.welcome:2438 MS (total 2438 ms)       # memory get:    command adb shell Dumpsys Meminf o  packagename     Get values for alloc and size  result-eg:     * * meminfo in PID 2427 [Com.tao Bao.taobao] **                     native   Dalvik   &NBS P;other    total             size:    14416     8583 &nbs P    n/a    22999        allocated:    10800     6383 &nbsp ;    n/a    17183             free:      647   &N Bsp 2200      N/A     2847             (PSS):     3193     7545    13536    24274   (shared Dirty):     1180     4040     2772     7992     (Priv Dirty): &nbs P   3168     5660     7756    16584    ================================= ==========================================    for any apk, the corresponding performance data can be obtained from the above command.

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.