Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/friendlyrobotnyc/tinydancer
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
https://github.com/friendlyrobotnyc/tinydancer
android android-library fps overlay performance performance-analysis
Last synced: about 2 months ago
JSON representation
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
- Host: GitHub
- URL: https://github.com/friendlyrobotnyc/tinydancer
- Owner: friendlyrobotnyc
- License: mit
- Archived: true
- Created: 2015-09-11T01:27:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-19T01:42:55.000Z (over 5 years ago)
- Last Synced: 2024-09-26T03:42:19.811Z (about 2 months ago)
- Topics: android, android-library, fps, overlay, performance, performance-analysis
- Language: Java
- Size: 9.33 MB
- Stars: 1,893
- Watchers: 58
- Forks: 172
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPRECATED
TinyDancer is deprecated. No more development will be taking place. Check out the [Google Android developer documentation for UI performance testing](https://developer.android.com/training/testing/performance)
# 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](https://raw.githubusercontent.com/brianPlummer/TinyDancer/master/assets/tinydancer2.png "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`:
```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:
```java
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](https://raw.githubusercontent.com/brianPlummer/TinyDancer/master/assets/tiny_dancer_011_example.gif "Tiny Dancer Sample")
Have an project with performance issues? We'd be happy to help tune it. [email protected]