Coder Social home page Coder Social logo

uiperforance's Introduction

是什么

UIPerformance用于监控APP性能,并以悬浮窗的形式展示性能参数:

  • FPS 帧率
  • CPU占用率
  • 内存使用

特性:

  • 代码中,默认采样周期为300ms
  • 悬浮窗在非UI线程进行绘制,不会影响主线程的检测
  • 代码目前还不支持配置,只能是使用默认配置

TODO:

  • 监控页面的启动时间
  • 支持扩展

demo_pic

使用

只需在Application中加入如下代码,对现有代码的侵入性小

public class UIPerformanceApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        //引入UI监控
        UIPerformance.getInstance(this).start();
    }
}

uiperforance's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

uiperforance's Issues

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

有人遇到以下问题吗?

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:679)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
        at com.lyri.uiperformance.core.view.MonitorView.attachMonitorViewToWindown(MonitorView.java:175)
        at com.lyri.uiperformance.core.view.MonitorView.run(MonitorView.java:135)

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.