TinyDancer

An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

Github星跟踪图

DEPRECATED

TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance testing

Tiny Dancer

A real time frames per second measuring library for Android that also shows a color coded metric. This metric is based on percentage of time spent when you have dropped 2 or more frames. If the application spends more than 5% in this state then the color turns yellow, when you have reached the 20% threshold the indicator turns red.

New Double tap overlay to hide!

“Perf Matters” - Random Guy at Meetup

Tiny Dancer

Min SDK

Tiny Dancer min sdk is API 16

Unfortunately this will not work on Android TV

Getting started

In your build.gradle:

 dependencies {
   debugCompile "com.github.brianPlummer:tinydancer:0.1.2"
   releaseCompile "com.github.brianPlummer:tinydancer-noop:0.1.2"
   testCompile "com.github.brianPlummer:tinydancer-noop:0.1.2"
 }

In your DebugApplication class:

public class DebugApplication extends Application {

  @Override public void onCreate() {

   TinyDancer.create()
             .show(context);
             
   //alternatively
   TinyDancer.create()
      .redFlagPercentage(.1f) // set red indicator for 10%....different from default
      .startingXPosition(200)
      .startingYPosition(600)
      .show(context);

   //you can add a callback to get frame times and the calculated
   //number of dropped frames within that window
   TinyDancer.create()
       .addFrameDataCallback(new FrameDataCallback() {
          @Override
          public void doFrame(long previousFrameNS, long currentFrameNS, int droppedFrames) {
             //collect your stats here
          }
        })
        .show(context);
  }
}

You're good to go! Tiny Dancer will show a small draggable view overlay with FPS as well as a color indicator of when FPS drop. You can double tap the overlay to explicitly hide it.

See sample application that simulates excessive bind time:

Tiny Dancer Sample

Have an project with performance issues? We'd be happy to help tune it. mike@friendlyrobot.nyc

主要指标

概览
名称与所有者friendlyrobotnyc/TinyDancer
主编程语言Java
编程语言Java (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2015-09-11 01:27:25
推送于2019-07-19 01:42:55
最后一次提交2019-07-05 21:35:08
发布数4
最新版本名称0.1.2 (发布于 2017-08-29 21:08:15)
第一版名称0.0.4 (发布于 )
用户参与
星数1.9k
关注者数57
派生数172
提交数148
已启用问题?
问题数34
打开的问题数8
拉请求数37
打开的拉请求数2
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?