
Received: 25 September 2015 Revised: 15 March 2017 Accepted: 21 March 2017 DOI: 10.1002/stvr.1635 SPECIAL ISSUE PAPER Detecting display energy hotspots in Android apps Mian Wan Yuchen Jin Ding Li Jiaping Gui Sonal Mahajan William G. J. Halfond Department of Computer Science, University of Southern California, Los Angeles, CA, USA Summary Correspondence The energy consumption of mobile apps has become an important consideration for develop- William G. J. Halfond, Department of ers as the underlying mobile devices are constrained by battery capacity. Display represents a Computer Science, University of Southern California, Los Angeles, California, USA. significant portion of an app’s energy consumption—up to 60% of an app’s total energy con- Email: [email protected] sumption. However, developers lack techniques to identify the user interfaces in their apps for Funding information which energy needs to be improved. This paper presents a technique for detecting display energy National Science Foundation, Grant/Award hotspots—user interfaces of a mobile app whose energy consumption is greater than optimal. The Number: CCF-1321141 and CCF-1619455 technique leverages display power modeling and automated display transformation techniques to detect these hotspots and prioritize them for developers. The evaluation of the technique shows that it can predict display energy consumption to within 14% of the ground truth and accurately rank display energy hotspots. Furthermore, the approach found 398 display energy hotspots in a set of 962 popular Android apps, showing the pervasiveness of this problem. For these detected hotspots, the average power savings that could be realized through better user interface design was 30%. Taken together,these results indicate that the approach represents a potentially impact- ful technique for helping developers to detect energy related problems and reduce the energy consumption of their mobile apps. KEYWORDS display, energy, mobile applications, optimization, power 1 INTRODUCTION An important observation is that the display component of a smart- phone consumes a significant portion of the device’s total battery power. This problem has only grown as smartphone display sizes have In less than six years, mobile apps have gone from zero downloads increased from an average of 2.9 inches in 2007 to 4.8 inches in 2014 to over 35 billion downloads [1,2]. Simultaneously, smartphones have [8]. Studies show that display can now consume up to 60% of the total achieved a nearly 31% penetration rate [3]. Smartphones and apps have energy expended by a mobile app [9,10]. Traditionally, optimizing dis- become so popular, in part, because they combine sensors and data play power has been seen as outside of the control of software devel- access to provide many useful services and a rich user experience. How- opers. This is true for LCD screens, for which energy consumption is ever,the usability of mobile devices is inherently limited by their battery based on the display’s brightness and is controlled by either the end power,and the use of popular features, such as the camera and network, user or the Operationg System (OS) performing opportunistic dimming can quickly deplete a device’s limited battery power.Therefore, energy of the display. However, most modern smartphones, such as the Sam- consumption has become an important concern. For the most part, sung Galaxy S7, are powered by a new generation of screen technology, major reductions in energy consumption have come about through a the organic light-emitting diode (OLED). For this type of screen, bright- focus on developing better batteries, more efficient hardware, and bet- ness is still important [11]; however, the colors that are displayed also ter operating system level resource management. However, software become important. Because of the underlying technology, this type of engineers have become increasingly aware of the way an app’s imple- screen consumes less energy when displaying darker colors (eg, black) mentation can impact its energy consumption [4-7]. This realization than lighter ones (eg, white). The use of these screens means there are has motivated the development of software-level techniques that can enormous energy savings to be realized at the software level by opti- identify energy bugs and provide more insights into the energy related mizing the colors and layouts of the user interfaces (UIs) displayed by behaviors of an application. the smartphone. In fact, prior studies have shown that savings of over 40% can be achieved by this method [6,9,10]. Softw TestVerif Reliab. 2017;27:e1635. wileyonlinelibrary.com/journal/stvr Copyright © 2017 John Wiley & Sons, Ltd. 1of15 https://doi.org/10.1002/stvr.1635 2of15 WAN ET AL. Despite the high impact of focusing on display energy, developers and identify the most impactful DEHs. Furthermore, the results gener- lack techniques that can help them identify where in their apps such ated by the approach can be generalized from one hardware platform savings can be realized. For example, the well-known Android bat- to others. The approach was also used to investigate 962 Android mar- tery monitor only provides device level display energy consumption ket apps; the investigation showed that 41% of these apps have DEHs. and cannot isolate the display energy per app or per UI screen. Other Overall, these results indicate that the approach can accurately iden- energy-related techniques have focused on surveys to identify patterns tify DEHs and can be useful to assist developers in reducing the display of energy consumption [5], design refactoring techniques that improve energy of their mobile applications. energy consumption [7,12], programming language level constructs to The rest of this paper is organized as follows: Section 2 describes make implementation more energy aware [13], energy visualization the approach for detecting DEHs. Section 3 describes how to build the techniques [14], or energy prediction techniques [15]. Although help- display power model for a device. The results of the evaluation are in ful, the mentioned techniques do not account for display energy nor Section 4. Related work is discussed in Section 5. Finally, the conclu- are they able to isolate display related energy. Existing work on dis- sions and contributions are summarized in Section 6. play energy has focused on techniques that can transform the colors in a UI (eg, Nyx [6] and Chameleon [10]). But these techniques do not 2 APPROACH guide developers as to where they should be applied, therefore they must be (1) used automatically for the entire app, which means that The goal of the approach is to assist developers in identifying UIs that although colors will be transformed automatically into more energy can be improved with respect to energy consumption. More specifi- efficient equivalents, the color transformation may be less aesthetically cally, the approach detects DEHs, which are UIs that consume more pleasing than a developer guided one; or (2) applied based solely on display energy than their energy-optimized versions would. Todetect developers’ intuition as to where they would be most effective, which these, the approach automatically scans each UI of a mobile app and means that some energy-inefficient UIs may be missed. then determines if a more energy efficient version could be designed. This paper presents a novel approach to assist developers in identi- It is important to note that DEHs are not necessarily energy bugs, as fying the UIs of their apps that can be improved with respect to energy the DEHs may not be caused by a fault in the traditional sense. Instead, consumption. To do this, the approach combines display energy mod- DEHs represent points where code is energy inefficient with respect to eling and color transformation techniques to identify a display energy an optimized alternative. After detecting the DEHs, the UIs are ranked hotspot (DEH)—a UI of a mobile app whose energy consumption is in order of the potential energy improvement that could be realized via higher than an energy-optimized but functionally equivalent UI. The energy optimization and then reported to the developers. approach is fully automated and does not require software developers Toachieve complete automation and not require developers to have to use power monitoring equipment to isolate the display energy,which, power monitoring equipment,there are two significant challenges to be as explained in Section 3, requires extensive infrastructure and tech- addressed. The first challenge is to determine how much display energy nical expertise. The approach to identify DEHs performs three general will be consumed by an app at runtime without physical measurements. steps. First, the approach traverses the UIs of an app and takes screen- Toaddress this, the insight is that power consumption can be estimated shots of the app’s UIs when they change in response to different user by a display power model that takes UI screenshots as input. The second actions. Second, for each screenshot, the approach calculates an esti- challenge is to determine whether a more energy-efficient version of a mate of how much energy and power could be saved by using a color UI exists and to quantify the difference between these two versions. To optimized version of the screenshot. Finally, the approach ranks the address this, the insight is that automated energy-oriented color trans- UIs based on the magnitude of these differences. The approach reports formation techniques can be used to recolor the screenshots and then these results, along with detailed power and energy information, to the calculate the difference between the original and the more efficient developer,who can target the most impactful UIs for energy-optimizing version. Based on these two insights, the approach can automatically transformations. detect DEHs without requiring power monitoring equipment. The paper also presents the results of an empirical evaluation of the An overview of the approach is shown in Figure 1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-