heimashi / Debug_view_kotlin
用kotlin实现的Android浮层调试控制台,实时的显示内存、FPS、文字log、app启动时间、Activity启动时间
Stars: ✭ 121
Programming Languages
kotlin
9241 projects
Projects that are alternatives of or similar to Debug view kotlin
Perf Tools
⏱→ 🚀A set of tools for improving performance your application (balancer, performance, PerfKeeper, LazyPromise).
Stars: ✭ 135 (+11.57%)
Mutual labels: fps, memory
Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+1814.05%)
Mutual labels: fps, memory
Lldebugtool
LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations.
Stars: ✭ 673 (+456.2%)
Mutual labels: fps, debugging-tool
Lldebugtoolswift
LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations.
Stars: ✭ 40 (-66.94%)
Mutual labels: fps, debugging-tool
Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+1022.31%)
Mutual labels: memory
Capturecalls.js
captureCalls('document.getElementById') to show a stack trace for document.getElementById on its every call
Stars: ✭ 112 (-7.44%)
Mutual labels: debugging-tool
Lwmem
Lightweight dynamic memory manager library for embedded systems with memory constraints. It implements malloc, calloc, realloc and free functions
Stars: ✭ 92 (-23.97%)
Mutual labels: memory
Pandora
an android library for debugging what we care about directly in app.
Stars: ✭ 1,365 (+1028.1%)
Mutual labels: debugging-tool
Lambda Toolkit
*DO NOT USE* - This project was done during my initial python and lambda's studies. I would recommend you the `serverless framework`.
Stars: ✭ 114 (-5.79%)
Mutual labels: debugging-tool
Debugoverlay Android
Android library to display various debugging information in an overlay window
Stars: ✭ 98 (-19.01%)
Mutual labels: fps
Chrome Protocol Proxy
Chrome DevTools Protocol Proxy - intelligent proxy for debugging purposes
Stars: ✭ 94 (-22.31%)
Mutual labels: debugging-tool
Debugme
Easy and efficient debugging for R packages
Stars: ✭ 118 (-2.48%)
Mutual labels: debugging-tool
Glxosd
GLXOSD is an extensible on-screen display (OSD)/overlay for OpenGL applications running on Linux with X11 which aims to provide similar functionality to MSI Afterburner/RivaTuner OSD. It can show FPS, frame timings, temperatures and more in OpenGL games and applications. It can also be used to benchmark games, much like voglperf.
Stars: ✭ 115 (-4.96%)
Mutual labels: fps
Freeproblemset
freeproblemset is a standard for acm-icpc contest problem storage in xml
Stars: ✭ 103 (-14.88%)
Mutual labels: fps
debug_view_kotlin
Debug-View是用Kotlin实现的用于Android调试的浮层调试控制台,这个控制台会一直浮在app的UI最上层, 用于实时地、直观地显示app的性能指标和日志信息:App使用的内存信息、App的实时帧率FPS、app启动时间、Activity启动时间、文字log信息。
- 推荐项目kotlin_tips,用Kotlin去提高生产力:汇总Kotlin相对于Java的优势,以及怎么用Kotlin去简洁、务实、高效、安全开发的Tips
- 推荐项目easy_mock_api,给客户端同学的模拟json接口的小工具
- 推荐项目CompatWebView,CompatWebView is used to fix addJavascriptInterface below Android 4.2
How to use
- 开启浮层权限:在App首次启动时,Debug-View可能会去请求开启浮层权限,开启后才能显示控制台
- 浮层Debug-View的区域说明:
- 如上图所示,浮层分为两个部分:左下角的矩形区域为控制区域,右上角的大矩形区域为显示日志区域,该区域不接收点击事件和焦点,会显示如下三种信息:
- 内存信息:Mem为手机剩余内存、Pss为应用所使用的总内存(包括共有的)、PD为应用的TotalPrivateDirty内存(私有的)
- 帧率FPS:手机的实时帧率FPS
- 启动时间:App启动时间以及Activity启动时间
- 文字Log:通过LogModule.instance.log("msg...")向浮层控制台输出任意日志
- 浮层的控制说明
- 点击左下角的控制区域(短按),会清空日志控制台信息
- 长按左下角的控制区域(长按),会隐藏或者显示右上角的浮层控制台
- 如上图所示,浮层分为两个部分:左下角的矩形区域为控制区域,右上角的大矩形区域为显示日志区域,该区域不接收点击事件和焦点,会显示如下三种信息:
How to import
- 对于已经支持kotlin的项目,在Application的module里添加依赖即可
dependencies {
debugImplementation 'com.sw.debug.view:debug-view:1.0.2'
releaseImplementation 'com.sw.debug.view:debug-view-no-op:1.0.2'
testImplementation 'com.sw.debug.view:debug-view-no-op:1.0.2'
}
如果是java项目需要先添加kotlin的支持,步骤是在Android Studio中选择tools ---> kotlin ---> Configure Kotlin in Project
- 初始化,建议在应用的Application中,初始化后debug-view就会生成一个浮层View显示内存和FPS
private fun initDebugView() {
DebugViewWrapper.instance.init(
DebugViewWrapper.Builder(this)
.viewWidth(250) /* the width of debug-view */
.bgColor(0x6f677700) /* the color of debug-view */
.alwaysShowOverlaySetting(true) /* the flag for always showing Overlay Setting */
.logMaxLines(20) /* the max lines of log */
)
DebugViewWrapper.instance.show()
}
- 自定义输出文字log到浮层控制台中
LogModule.instance.log("some msg...")
-
统计应用的启动时间(详细见example案例)
- 一般以Application中的attachBaseContext()作为应用启动的开始点,故在attachBaseContext()方法中调用
TimerModule.instance.begin(application)
- 一般以主页显示出来作为应用启动的结束点,故在MainActivity中的onWindowFocusChanged()函数中调用(不要在Activity的onResume中调用,此时Activity还未完全显示)
override fun onWindowFocusChanged(hasFocus: Boolean) { super.onWindowFocusChanged(hasFocus) if(hasFocus){ TimerModule.instance.end(application) } }
-
统计Activity的启动时间
- 一般项目中都有BaseActivity,以BaseActivity的onCreate作为启动的开始点:
TimerModule.instance.begin(this)
- 同理在BaseActivity的onWindowFocusChanged()作为启动的结束点:
override fun onWindowFocusChanged(hasFocus: Boolean) { super.onWindowFocusChanged(hasFocus) if(hasFocus){ TimerModule.instance.end(this) } }
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].