GithubHelp home page GithubHelp logo

msttyy / battery_alalyze Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ontheway111/battery_analysis

0.0 1.0 0.0 9.26 MB

安卓后台耗电分析(参考batteryHistorian的分析逻辑)

HTML 95.88% Python 4.12%

battery_alalyze's Introduction

安卓后台耗电分析

通过分析bugreport文件,统计后台耗电各项指标,以及指标是否合格。

  • 支持系统:

    • windows
    • Linux
    • Mac
  • 需要环境:

    • python3.5+
  • 使用指南:

# 1.将bugreport报告放到files目录下
# 2. 执行run.py
# <= android 6
# bugreport_file = "bugreport_SM9.txt"
# >= android 7
bugreport_file = "bugreport-2020-12-10-15-08-27.zip"
app_name = "wechat"
pkg_name = "com.tencent.mm"
app_info, battery_statistics, report_html = analyze_report(app_name, pkg_name, bugreport_file)

logger.success(app_info)
logger.success(battery_statistics)
logger.success("后台耗电报告: %s" % report_html)
  • 输出html报告: image

  • 代码结构说明

    • files: bugreport文件存放地址
    • report:生成的报告存放地址
    • src: 核心逻辑
    • templates: 报告模版文件
    • run.py: 生成报告执行文件

battery_alalyze's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.