一句话:通过单元测试执行将能耗关联到每行代码,并发现对象属性创建数量与 Java 源代码能耗相关。
该研究关注软件开发中的可持续性以及开发者对降低软件能耗策略认识不足的问题。作者提出利用单元测试执行来分析软件运行能耗,将能耗数据关联到具体源代码行,从而帮助开发者识别能耗密集的执行路径。方法上,他们选取五个热点和五个冷点进行人工分析,以归纳可能高能耗的源代码构造。初步结果发现,源代码的能耗与代码中创建的对象属性数量之间存在关联。该工作为后续在 Java 中进一步分析对象实例化与能耗关系奠定了基础。
The software engineering community has increasingly recognized sustainability as a key research area. However, developers often have limited knowledge of effective strategies to reduce software energy consumption. To address this, we analyze energy consumption in software execution, aiming to raise developer awareness by linking energy consumption with each line of code. We rely on unit test executions to identify energy-intensive executions and manually analyze five hot and five cold spots to identify potentially energy-intensive source code constructs. Our findings suggest a link between the energy consumption of the source code and the number of objects' attributes created within that code. These results lay the groundwork for further analysis of the relationship between object instantiation and energy consumption in Java.
@inproceedings{paperbot9134,
title = {Energy Codesumption, Leveraging Test Execution for Source Code Energy Consumption Analysis},
author = {Jérôme Maquoi and Maxime Cauz and Benoit Vanderose and Xavier Devroey},
booktitle = {FSE},
year = {2025},
doi = {10.1145/3696630.3728707}
}