Energy Consumption Estimation of API-usage in Mobile Apps via Static Analysis
Smartphone application (app) developers measure or estimate the energy consumption of their apps to ensure that they are not consuming too much energy before releasing them to the end-users. However, existing measurement and estimation techniques are cumbersome because they require developers to generate test cases and execute them on an expensive, sophisticated hardware. To address these challenges, we have proposed a static-analysis based approach that estimates the energy consumption of API usage in an app, and eliminates the need for generating and executing test cases. To instantiate our approach, we have created micro-benchmarks for the Swift SQLite API and measured the energy profile of its select, insert, and update operations. Given a Swift app, we first scan it for uses of SQLite. We then combine that information with the measured energy profile to compute E-factor, an estimate of the energy consumption of the API usage in an app. To showcase the viability of using E-factor in practice, we calculate the E-factor of 56 real-world iOS apps, and compare 16 versions and 11 methods to their hardware-based energy measurements. Our findings show that E-factor has a positive correlation with the hardware-based energy measurements. This result indicates that E-factor can be used as an estimate to compare the energy consumption difference in API usage across the different versions of an app. Additionally, developers can use E-factor to identify which methods within their apps have the highest energy consumption and focus on optimizing those methods. Our approach is most useful in an Integrated Development Environment (IDE) or Continuous Integration/Continuous Deployment (CI/CD) pipeline, where developers can receive warnings about high energy consumption in their app within milliseconds of making a modification to their code.
Mon 15 MayDisplayed time zone: Hobart change
16:35 - 17:20 | Ethics & EnergyTechnical Papers / Registered Reports at Meeting Room 109 Chair(s): Arumoy Shome Delft University of Technology | ||
16:35 12mTalk | Energy Consumption Estimation of API-usage in Mobile Apps via Static Analysis Technical Papers Abdul Ali Bangash University of Alberta, Canada, Qasim Jamal FAST National University, Kalvin Eng University of Alberta, Karim Ali University of Alberta, Abram Hindle University of Alberta Pre-print | ||
16:47 12mTalk | An Exploratory Study on Energy Consumption of Dataframe Processing Libraries Technical Papers Pre-print | ||
16:59 6mTalk | Understanding issues related to personal data and data protection in open source projects on GitHub Registered Reports Anne Hennig Karlsruhe Institute of Technology, Lukas Schulte Universitity of Passau, Steffen Herbold University of Passau, Oksana Kulyk IT University of Copenhagen, Denmark, Peter Mayer University of Southern Denmark | ||
17:05 12mTalk | Whistleblowing and Tech on Twitter Technical Papers Laura Duits Vrije Universiteit Amsterdam, Isha Kashyap Vrije Universiteit Amsterdam, Joey Bekkink Vrije Universiteit Amsterdam, Kousar Aslam Vrije Universiteit Amsterdam, Emitzá Guzmán Vrije Universiteit Amsterdam |