Currently, people spend a lot of time using their mobile devices. With such ubiquity of mobile devices in our daily life, battery capacity and quality are of utmost importance. Running software applications (called apps) are one of the major factors influencing the power consumption in mobile devices. In order to meet user needs, mobile apps are becoming inherently complex and resource greedy. Therefore, fulfilling these requirements at the pace imposed by the market may degrade software construction quality and insert so-called energy code smells: bad patterns in the source code of an app that indicate a deeper problem and adversely affect power consumption. This work proposes a developer-oriented framework for identifying and fixing patterns via analyzing different application code flavors in a user-driven test scenario. A special app was designed in order to validate the Android implementation of the proposed methodology. The study results have shown significant improvement regarding energy efficiency after correcting one or more energy code smells, with a 4 to 30 percent decrease in battery drain. Additionally, the power consumption signature term is defined in the context of mobile applications. This paper presents a developer-oriented framework for assessing power consumption in mobile applications. Our key contributions include identifying significant energy code smells, demonstrating their impact on power consumption, and providing a toolset for developers to improve energy efficiency.
Read full abstract