• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Weex Analyzer


Download GitHub release GitHub release

Weex Analyzer是一款运行在手机客户端上辅助开发者进行weex开发的小工具。 接入此工具后,开发者可以在debug包中通过摇一摇打开功能选项。目前实现的功能有:

  1. log日志查看,支持日志分级、搜索
  2. weex性能分析(查看当前weex页面性能指标/以图表方式展示历史性能指标变化趋势)
  3. weex storage查看、删除
  4. 实时帧率、丢帧数、内存占用悬浮框
  5. 流量监控
  6. cpu/内存/fps 实时折线图
  7. 页面3d视图
  8. js报错实时通知
  9. 远程调试js。(依赖weex dev tool)
  10. 渲染性能分析(如自动分析页面嵌套层级,深层嵌套高亮透出);
  11. 视图审查(点击查看任意元素样式)

接入

添加依赖

debugCompile 'com.taobao.android:weex_analyzer:${latest version}'

代码集成

具体请参考commonsmodule下WXAnalyzerDelegateAbstractWeexActivity.

使用手册

1. 功能开启
  • 前置条件: a. 已集成weex_analyzer,并初始化. b. 设备已开启传感器相关权限(模拟器不用)
  • 真机: 进入weex页面,"摇一摇".
  • 模拟器: 进入weex页面,使用快捷键"cmd+M"(即menu键). 如果使用genomotion模拟器,需要查看首页是否能看到menu标识,如果没有,需要手动打开。仍然不行的话可以尝试adb命令adb shell input keyevent KEYCODE_MENU

功能开启

2. weex性能指标

每一个weex页面都有若干性能相关的指标,比如首屏渲染时间、js下载时间、sdk初始化时间等,这些指标对用户体验有着直接的影响,因而我们很有必要去关注它们。weex-analyzer提供了图形化的方式观测这些指标。 打开【weex性能指标】选项,【current performance】用于观察这一次页面打开过程中的性能指标,【history performance】记录最近若干次(max=6)打开此页面的指标变化趋势。

weex性能指标1

weex性能指标2

3. 内存

每一个weex页面最终都会被渲染成native view,与传统android应用一样,weex页面也会出现内存泄露、内存抖动、oom等问题。因而我们也需要关注内存变化趋势。打开【内存】选项,即可看到当前app实时内存变化趋势(与android studio memory monitor类似)。默认每秒采样一次。

性能指标

4. cpu

与【内存】选项类似,【cpu】选项中可以实时显示cpu使用率。这里的cpu取值为当前app CPU 在user mode与kernel mode下的使用率之和。

5. fps

与【内存】选项类似,【fps】选项中可以实时显示fps值。

6. weex storage

可以实时查看weex storage存储状态。单击可以查看value详情,长按可以删除k-v。

storage

7. 3d视图

以3d形式展示当前weex视图状态,可拖拽、缩放。

3d视图

8. 日志

类似android logcat. 实时展示开发日志。支持日志分级、搜索。另外提供了默认的过滤关键字,比如js logcallNative等。

日志以悬浮窗形式展示,可拖拽,可调整大小。

日志

9. js远程调试

首先需要集成weex dev tool

操作步骤:

  1. 命令行下输入weex debug,打开调试服务器(会在浏览器上打开一个页面)。
  2. 打开【js远程调试】选项(首次打开需要输入server端ip),即可自动连接到调试服务器。
  3. 若服务端ip发生变化,可进入【配置】页面输入新的ip地址。

此功能方便没有集成【扫一扫】功能的app,或者是无法使用【扫一扫】的场景(如模拟器)。

10. 渲染性能分析

点击【渲染性能分析】按钮,即可开启。

注:

  1. 支持同时展示native层级与vdom层级,对于vdom层级超过14层的,会自动高亮透出;
  2. 支持检查页面是否存在list/scroller,预估屏数等;

渲染性能分析

11. 视图审查

点击任意元素,查看其视觉样式。

视图审查

More Repositories

1

article

This repos is a third party collection, and is not developed nor maintained by Apache Weex.
1,223
star
2

hackernews-App-powered-by-Apache-Weex

Java
1,153
star
3

vue-framework-for-Apache-Weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
297
star
4

devtool-for-Apache-Weex

debugger tools with chrome devtool for Apache Weex
JavaScript
258
star
5

android-devtools-for-Apache-Weex

Remote debug for your native Android app using Chrome Developer Tools
Java
165
star
6

weex-vue-render

vue-render-for-apache-weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
143
star
7

devtool-iOS-for-Apache-Weex

Remote debug for your native iOS app using Chrome Developer Tools
Objective-C
124
star
8

devtool-extension-for-Apache-Weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
31
star
9

vue-loader-for-apache-weex

vue-loader-for-apache-weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
30
star
10

picker-for-Apache-Weex

picker for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
20
star
11

previewer-tool-for-Apache-Weex

a tool help user to preview their weex files
JavaScript
20
star
12

downgrade-for-Apache-Weex

A module in order to downgrade to web for Apache Weex
JavaScript
19
star
13

intellij-plugin-for-Apache-Weex

intellij-plugin-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Kotlin
19
star
14

pack-android-tools-for-Apache-Weex

pack-android-tools-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Java
13
star
15

a-builder-for-apache-weex

a-builder-for-apache-weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
13
star
16

analyzer-of-iOS-for-Apache-Weex

analyzer-of-iOS-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Objective-C
9
star
17

styler-transformer-for-Apache-Weex

styler-transformer-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
9
star
18

templater-for-Apache-Weex

templater-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
7
star
19

weex-ui

Vue
7
star
20

xtoolkit-for-Apache-Weex

A toolkit for CLI-for-Apache-Weex
JavaScript
7
star
21

DSL-transformer-for-Apache-Weex

DSL-transformer-for-Apache-Weex is is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
7
star
22

Rax-Framework-for-Apache-Weex

Rax-Framework-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
7
star
23

pack-ios-tools-for-Apache-Weex

pack-ios-tools-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Objective-C
5
star
24

rx-webpack-plugin-for-Apache-Weex

This repos is a third party collection, and is not developed nor maintained by Apache Weex.
4
star
25

scripter-transformer-for-Apache-Weex

<script> transformer for Apache Weex
JavaScript
4
star
26

gulp-for-weex-transformer

gulp plugin for weex transformer
JavaScript
4
star
27

eslint-config-weex-for-Apache-Weex

eslint-config-weex-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
4
star
28

Template-for-Apache-Weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
4
star
29

vue-precompiler-for-apache-weex

vue-precompiler-for-apache-weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
4
star
30

pack-create-for-Apache-Weex

pack-create-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
4
star
31

vdom-tester-for-Apache-Weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
3
star
32

Plugin-demo-for-Apache-Weex

Plugin-demo-for-Apache-Weex is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
3
star
33

rx-generator-for-Apache-Weex

rx generator for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
3
star
34

weex-loader

JavaScript
2
star
35

website

The source code of weex website.
SCSS
2
star
36

wd-for-Apache-Weex

wd-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
2
star
37

pack-lib-for-Apache-Weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
1
star
38

env

This repos is a third party work, and is not developed nor maintained by Apache Weex.
JavaScript
1
star
39

Container-iOS-plugin-for-Apache-Weex

Container-iOS-plugin-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
Objective-C
1
star
40

pack-common-for-Apache-Weex

pack-common-for-Apache-Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
1
star
41

wwp-for-Apache-Weex

wwp for Apache Weex is a third party plugin, and is not developed nor maintained by Apache Weex.
JavaScript
1
star
42

weex-toolkit

JavaScript
1
star
43

android-plugin-for-weex

This repos is a third party work, and is not developed nor maintained by Apache Weex.
Java
1
star
44

vue

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
JavaScript
1
star