Blockcanary a lightweight, non-intrusive performance monitoring component (ALI)

Source: Internet
Author: User

Developer Blog:

blockcanary-easy to find the Android app interface lag culprit

Open Source code: Moduth/blockcanary

Blockcanary fully transparent monitoring of the main thread operation, and can output effective information, help develop analysis, locate the problem, and quickly optimize the application. The features are:

    • Non-intrusive, simple two lines to turn on monitoring, do not need to go everywhere, breaking code elegance.
    • Precision, the output of information can help to locate the problem (accurate to the line), do not need to look like logcat, slowly.

Currently includes the core monitor output file, as well as UI display stutter information function. Only Android-enabled.

Use: (as Environment)

1. build.gradle file under App:

1 compile ' com.github.moduth:blockcanary-android:1.1.0 '2//  If only want to see eject notification in the debug package3 debugcompile ' com.github.moduth:blockcanary-ui:1.1.0 '

2. Inherit and implement Blockcanarycontext class

Implement various contexts, including application identifier, user uid, network type, card slow judgment threshold, log save location, etc.
Rewrite the Getuid method, return the UID inside the app, etc...

3. Initialization

1 // in the main process initialization 2 blockcanary.install (Thisnew appblockcanarycontext ()). Start ();

Blockcanary a lightweight, non-intrusive performance monitoring component (ALI)

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.