Toward using software metrics as indicator to measure power consumption of mobile application: a case study - Ching, Kin Keong; Koh, Tieng Wei; Abd Ghani, Abdul Azim; Sharif, Khaironi Yatim (IEEE, 2015)
Battery capacity of mobile devices is a critical issue for developing green mobile applications. Therefore, energy efficiency has become a major concern nowadays for energy restricted embedded system such as smartphones and tablets. In industry, it is a challenge for them to develop an energy efficient product while meeting customer expectation. In previous study, there is lack of method that uses software metrics to measure power consumption of mobile applications. In this paper we have identified several software metrics that can be used as indicator to measure mobile application power consumption. The objective of this study is to which identify software metrics is suitable act as indicators to measure power consumption of mobile applications. This can help mobile software designer to measure power used for their mobile applications in the early design phase. In order to prove this concept, we randomly select two open source mobile applications as our case study. The power used of a mobile application is collected by using Trepn Profiler (Power profiling tool for Qualcomm processor CPU). We capture the actual power consumption and estimated power consumption (without calculate Android OS and profiling tool power) with the profiler. There are overall 18 available metrics based on Object-Oriented Metrics. We map the 18 metrics with the power consumption captured by Trepn Profiler. The results shown that McCabe cyclomatic complexity, number of parameters, nested block depth, weighted methods per class, number of overridden method, number of methods, total lines of code and method lines have significant relationship with power consumption of mobile application. Therefore, these eight metrics can be used as the indicator to measure mobile applications' power consumption.