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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?