[论文解读] Anti-patterns and the energy efficiency of Android applications
本文研究了八种面向对象及Android特有反-pattern对移动应用能效的影响。通过使用59个开源Android应用的受控测试环境,作者测量了重构前后应用的能耗,发现反-pattern会显著增加能耗——尽管重构可能改善或恶化能效,具体取决于反-pattern类型,凸显了在移动开发中实施能效感知重构的必要性。
The boom in mobile apps has changed the traditional landscape of software development by introducing new challenges due to the limited resources of mobile devices, e.g., memory, CPU, network bandwidth and battery. The energy consumption of mobile apps is nowadays a hot topic and researchers are actively investigating the role of coding practices on energy efficiency. Recent studies suggest that design quality can conflict with energy efficiency. Therefore, it is important to take into account energy efficiency when evolving the design of a mobile app. The research community has proposed approaches to detect and remove anti-patterns (i.e., poor solutions to design and implementation problems) in software systems but, to the best of our knowledge, none of these approaches have included anti-patterns that are specific to mobile apps and--or considered the energy efficiency of apps. In this paper, we fill this gap in the literature by analyzing the impact of eight type of anti-patterns on a testbed of 59 android apps extracted from F-Droid. First, we (1) analyze the impact of anti-patterns in mobile apps with respect to energy efficiency; then (2) we study the impact of different types of anti-patterns on energy efficiency. We found that then energy consumption of apps containing anti-patterns and not (refactored apps) is statistically different. Moreover, we find that the impact of refactoring anti-patterns can be positive (7 type of anti-patterns) or negative (2 type of anti-patterns). Therefore, developers should consider the impact on energy efficiency of refactoring when applying maintenance activities.
研究动机与目标
- 调查反-pattern对Android应用能效的影响,这是移动软件工程中一个关键但研究不足的领域。
- 开发并验证一种在受控条件下可靠测量移动应用能耗的方法论。
- 评估重构反-pattern是否能带来能效的可测量提升或退化。
- 识别出对能耗影响最大的反-pattern,以支持有针对性的重构策略。
- 为移动应用开发中能效感知的重构工具和实践设计提供依据。
提出的方法
- 本研究使用来自F-Droid的59个开源Android应用构建测试环境,以评估能耗。
- 能耗通过Green Miner硬件分析仪测量,该设备通过INA219传感器和Raspberry Pi以50 Hz的频率记录电压和电流。
- 作者对比了原始版本(含反-pattern)与重构版本(已移除反-pattern)的应用能耗。
- 为每款应用执行标准化测试场景,以确保运行时条件一致并可测量能耗差异。
- 将该方法与最先进的能耗测量方法进行对比,以验证其可靠性和准确性。
- 应用统计分析以确定重构与非重构版本之间的能耗差异是否具有显著性。
实验结果
研究问题
- RQ1Android应用中存在反-pattern是否会导致能耗的统计学上显著差异?
- RQ2重构特定反-pattern如何影响Android应用的能效?
- RQ3是否存在重构后导致能耗增加的反-pattern?若有,具体是哪些?
- RQ4能否建立一种可靠且可重复的能耗测量方法论,用于反-pattern影响的实证评估?
- RQ5不同类型的反-pattern在多大程度上导致移动应用的能效低下?
主要发现
- 含有反-pattern的应用比其重构版本消耗显著更多的能量,表明不良设计与能效低下之间存在强烈关联。
- 在八种反-pattern中,七种的重构均实现了能耗降低,表明大多数重构能提升能效。
- 两种反-pattern——过早绑定资源和私有getter/setter——在重构后导致能耗增加,表明其影响具有上下文依赖性。
- 本研究证实,设计选择,特别是与资源管理和方法访问模式相关的决策,会直接影响能耗。
- 所提出的能耗测量方法论提供了可靠且可重复的结果,在一致性和准确性方面优于现有方法。
- 研究结果强调了在重构工具和IDE中集成能效考量的重要性,以避免意外的性能退化。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。