battery-historian | Battery Historian is a tool to analyze battery consumers | Monitoring library
kandi X-RAY | battery-historian Summary
kandi X-RAY | battery-historian Summary
Battery Historian is a tool to inspect battery related information and events on an Android device running Android 5.0 Lollipop (API level 21) and later, while the device was not plugged in. It allows application developers to visualize system and application level events on a timeline with panning and zooming functionality, easily see various aggregated statistics since the device was last fully charged, and select an application and inspect the metrics that impact battery specific to the chosen application. It also allows an A/B comparison of two bugreports, highlighting differences in key battery related metrics.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of battery-historian
battery-historian Key Features
battery-historian Examples and Code Snippets
Community Discussions
Trending Discussions on battery-historian
QUESTION
I really need to see the battery stats of one of the app I am working on. I have been following below steps from the official Android documentation.
https://developer.android.com/studio/profile/battery-historian.html#gather-data
I have achieved steps 1 to 10 & also managed to get the batterystats.txt & bugreport.zip out the Android Device.
I have installed docker & was trying to execute Step 11 but it throws the following error.
I tried removing the '--' ahead of run and managed to get rid of the error. Now I am executing the below command and seeing the another error as screenshot below.
I have seen for other people that it downloads the battery historian image to the local machine in case if it isn't found locally. The same case is not with me. I have tried logging in to the docker as well but no lock.
Is there any way I can download the battery historian image to the local machine & execute the command that belongs to step 11? Any help would be appreciated. Thanks in advance.
...ANSWER
Answered 2018-Feb-12 at 07:19Finally I managed to see the battery stats of an app. I would like to write down here hoping that it would be helpful to someone doing the same.
I would like to say thanks to this guy over the Github who has gone extra mile working on this - https://github.com/google/battery-historian/issues/125#issuecomment-361369864
Below are the steps.
(1) Download the battery historian image first -
Use the command docker pull kenyee/battery_historian
to download the image to your local machine as the screenshot below.
(2) Run the battery historian image -
Run the command docker run -d -p 1234:9999 kenyee/battery_historian
as the screenshot below.
(3) Open battery historian using browser Open the http://localhost:1234/ to your browser. 1234 stands for the port number we have defined with the command above. If you decide to use the port number other than 1234 in the command above, the URL will also be changed accordingly. As soon as we hit the enter, browser will show up the battery historian as the screenshot below.
(4) View battery stats Upload your bugreport file, hit submit & you will see the battery stats of an app as the screenshot below.
Hope it helps. :)
QUESTION
Hi I am working on battery-historian
to get battery history of android app, I have installed and login in Docker success in Android studio terminal, and when I run docker run -p 5555:9999 gcr.io/android-battery-historian/stable:3.0 --port 9999
, there always display a message showing the option is unauthorized:
ANSWER
Answered 2018-Apr-05 at 14:21I have the same issue. Also found it mentioned in a comment (Dec 13 2017, 23 upvotes as of now) on https://github.com/google/battery-historian/issues/125.
No response from Google it seeems, but using https://hub.docker.com/r/bhaavan/battery-historian/ as a workaround has been suggested, which seems to work for me too.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install battery-historian
That's it, you're done! Historian will be available at http://localhost:<port>.
You may have to enable Virtualization in your BIOS.
Once you start Docker, it should tell you the IP address of the machine it is using. If, for example, the IP address is 123.456.78.90, Historian will be available at http://123.456.78.90:<port>.
Follow the instructions available at http://golang.org/doc/install for downloading and installing the Go compilers, tools, and libraries.
Create a workspace directory according to the instructions at http://golang.org/doc/code.html#Organization.
Ensure that GOPATH and GOBIN environment variables are appropriately set and added to your $PATH environment variable. $GOBIN should be set to $GOPATH/bin. For Windows, you may set environment variables through the "Environment Variables" button on the "Advanced" tab of the "System" control panel. Some versions of Windows provide this control panel through the "Advanced System Settings" option inside the "System" control panel. For Linux and Mac OS X, you can add the following lines to your ~/.bashrc or ~/.profile files (assuming your workspace is $HOME/work): export GOPATH=$HOME/work export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page