APP测试-耗电量测试

1.下载battery historian

下载地址:https://github.com/google/battery-historian
简介:go语言开发的,分析电池耗电工具,Android5.0以上
https://developer.android.com/topic/performance/power/setup-battery-historian

2.安装go语言

下载地址:https://golang.org/dl/

配置环境变量 命令行启动go 可正常启动

3.下载git

下载地址:https://git-scm.com/

4.安装battery historian

git 命令行执行
git clone https://github.com/google/battery-historian.git (将项目克隆岛本地)

cd /Users/zhangshan/go/src/github.com/google/battery-historian (进入battery-historian目录下)

go get -d -u github.com/google/battery-historian/... (下载项目到GOPATH配置目录下 自动 完成依赖)

cd third_party/closure-library/

git reset --hard v20170409

cd -

go run setup.go

go run cmd/battery-historian/battery-historian.go (运行Battery Historian)
端口默认9999 (web项目)

5.启动Battery Historian

打开浏览器:localhost:9999,启动成功

posted @ 2020-02-04 21:30  张珊33  阅读(303)  评论(0编辑  收藏  举报