APP测试-耗电量测试

时间:2020-12-15 18:01:48

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/
APP测试-耗电量测试
配置环境变量 命令行启动go 可正常启动
APP测试-耗电量测试

3.下载git

下载地址:https://git-scm.com/
APP测试-耗电量测试

4.安装battery historian

git 命令行执行
git clone https://github.com/google/battery-historian.git (将项目克隆岛本地)
APP测试-耗电量测试
cd battery-historian
APP测试-耗电量测试
go get -d -u github.com/google/battery-historian/
go run setup.go
go run cmd/battery-historian/battery-historian.go