Getting to Know Battery Historian

Getting to Know Battery Historian

BY Nawab Ahmad Reshi 2020年 12月 09日 Tizen Studio

Overview

Battery life has always been one of the top features of Tizen devices, but some modules or apps can contribute to battery drain and impact the user experience across the device. Battery management is of primary concern and must be dealt in detail.

Tizen devices usually come with limited battery life, given the electronic characteristics, the size, and the operating conditions of the device. The battery requirements become apparent, and the choice is oriented. However, the device runtime depends on the power characteristics, and care must be taken to reduce power consumption as much as possible. To analyze the battery consumption, Tizen Studio provides a Battery Historian that comes in very handy in such situations. It graphically shows battery consumption details and helps you to optimize battery usage.

This blog emphasizes analyzing the power consumption of battery-operated Tizen devices and the implications for battery life and runtime using a Battery Historian tool. It also covers how to use Battery Historian, retrieving device reports, and reading the battery data. 

What is Battery Historian? 

Battery Historian is an expert analysis tool that shows several metrics and insights related to battery consumption. Battery Historian is a tool that allows you to analyze a Tizen device behaviour, and more precisely helps in reviewing the information and events related to the battery. It generates visual graphs after analyzing the battery dumps of a Tizen based device. The charts that get created show various analytics related to battery consumption, how and which components consumed the battery power.

Why use Battery Historian?

You can use Battery Historian to learn about battery-consumption patterns, read the system-wide battery reports, and diagnose and troubleshoot device behavior related to battery consumption. You can also use it to compare battery consumption reports of the same device or from different Tizen devices. Battery Historian highlights the key battery metrics in detail for you to analyze and thus optimize the device components for judicious use of the battery. The Battery Historian tool is part of the feature-rich Tizen IDE. Before setting out to use the Battery Historian tool, ensure that all the preconditions are met, for more information, see Battery Historian.

You can open and access the Battery Historian tool by navigating to Tizen Studio menu and then selecting Tools > Battery Historian, Alternatively, on the Tizen Studio toolbar, click Battery Historian. You will see the following window: 

 

After you open the Battery Historian tool in Tizen Studio, you need to browse for a battery bug report file for getting the battery statistics. The battery bug report file can be generated from the Linux terminal on your Tizen device, for more information see Generate Bug Report File.

After you browse the battery bug report file, you will see a chart showing different device components with their corresponding battery usage stats. A few of the device components for which you can see the battery consumption stats are CPU Running, Kernel only uptime, Wi-Fi on, GPS, BLE Scanning, and so on. For full details and more information about the graph, see View and analyze Battery Data.

How can I work with the illustrated data?

The charts and stats generated from the battery bug report provide various sets of data that you can see and figure out the problem and thus troubleshoot the same. For instance, the main battery historian chart shows the time on the X-axis during which a component of the device is active versus the Y-axis battery level. The graph shows some interesting information to provide a general feel for the device stability and performance. 

If you are following along, you will notice that no two reports look the same. You will find that the reports can look slightly different based on device, device capabilities, and events that occurred during the logging period. The bug report data will differ even if the bug reports are from the same device. 

If you are investigating a specific device's general performance or battery drain, you will be much more interested in examining the contents of the System Stats tab of the report. To get more information about the system stats tab, see Interpret the Graph.

How to do a comparative analysis of bug reports? 

You can analyze two battery bug reports and view the comparative analysis in charts and systems stats. Using the comparative stats, you can analyze the key differences or similarities in the battery consumption of a component of a device. Tune the component as per your analysis, re-run the Battery Historian test, and compare the previous and latest results to see if the tune-up helped optimize the component. With comparative stats, you can diagnose several potential challenges and find which component is doing what and how well. 

You can review these stats and think about the impact they have on the device. Here are a few questions that you can analyze using the comparative stats: Are you using sensors in your application that you did not expect to use? Is X component staying awake longer than it is intended to while using the application? That is how you can think and make your application battery friendly. 

This blog post is focused on using Battery Historian from the perspective of a Tizen device. Your battery reports and data will look different each time for obvious reasons. Still, they will provide the data you need to give your users the best possible user experience while using your application without worrying to drain much of the battery power.

If you are using a component on your Tizen device, look at your device through the lens of Battery Historian. Whether it is the camera, GPS, audio, Bluetooth, or any other sensor on the device, they need to be adequately utilizing the battery. Your focus on what you optimize and how you can optimize depends on the type of application you are building and your user's expectations.

 

 

Written by Nawab Ahmad Reshi
Keep Reading All Posts
Read More
Read More
Read More