Giter Site home page Giter Site logo

tracefix's Introduction

English README.md    中文 README_zh.md

TraceFix

Auto add systrace Tag when project compiling

Getting Started

  1. Configure TRACEFIX_VERSION in gradle.properties.
TRACEFIX_VERSION=0.0.5
  1. Add matrix-gradle-plugin in your build.gradle(Root project or module, Make sure it looks like below):
buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath("com.androidperf:tracefix:${TRACEFIX_VERSION}"){ changing = true }
        implementation 'androidx.appcompat:appcompat:1.2.0'
    }
}
  1. Add AndroidX for Appcompat Api(This is needed for now )
dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
}
  1. Add dependencies to your app/build.gradle.
apply plugin: 'auto-add-systrace'
  1. Build and install apk , run systrace tools, " -a your-package-name" is Needed!
python /path-to-your-systrace/systrace.py -a your-package-name

#for example
python /mnt/d/Android/platform-tools/systrace/systrace.py -a com.android.settings
  1. Open trace file on Chrome or https://ui.perfetto.dev/#!/viewer

TODO

  1. Add white list and black list
  2. Class name opt
  3. Init method opt
  4. Disable get、set
  5. No-AndroidX opt

Module

android-systrace-sample-remote-debug

Demo module , just for remote test

android-systrace-sample-local-debug

Demo module , just for local test

android-systrace-sample-jetpack

Demo module , just for test

android-systrace-plugin

plugin module , add trace tag when entering a method and exiting a method

Code Change

Before auto add trace tag

Demo

After auto add trace tag

Demo

Systrace

Demo Project

Demo

Demo

tracefix's People

Contributors

gracker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.