arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2607.06124cs.SEcs.AIcs.LG
收藏

静态指标不足:利用执行时间预测Java方法的能耗

Static Metrics Are Insufficient: Predicting Java Method Energy Usage with Execution Time

University of L’Aquila(拉奎拉大学);Vrije Universiteit Amsterdam(阿姆斯特丹自由大学)

Muhammad Imran, Vincenzo Stoico, Ivano Malavolta

AI总结:

研究Java中方法级能源预测局限,通过对2786个Java方法提取静态特征、测量执行时间和能耗,训练比较11个回归模型,发现仅静态指标预测差,加入执行时间可显著提高准确性,执行时间等是能耗的强预测因素。

摘要:

软件系统不断增长的能源需求引发了对其环境影响和相关成本的担忧。在开发流程早期对能源使用进行推理,有可能显著降低软件系统的整体能源使用,因为这能让开发者在效率低下问题扩散之前做出明智的设计和重构决策。然而,在没有重复分析和直接测量的情况下评估能源使用是困难的,这限制了实际中的早期推理。本研究调查了Java中方法级能源预测的局限性,研究了静态源代码指标辅以方法级执行时间能否估计Java方法的能耗。我们对2786个Java方法进行分析,提取33个静态特征并测量执行时间和能耗,然后训练并比较了11个回归模型。结果表明,仅静态源代码指标的预测性能较差,平均R2值接近零。将执行时间作为轻量级动态输入能显著提高准确性,R2高达0.46。执行时间、内部方法调用和圈复杂度始终是能耗的最强预测因素。

英文摘要:

The increasing energy demand of software systems is raising concerns about their environmental impact and associated costs. Reasoning on energy usage early in the development flow has the potential to significantly reduce the overall energy usage of a software system, as it allows developers to make informed design and refactoring decisions before inefficiencies propagate. However, assessing energy usage without repeated profiling and direct measurement is difficult, which limits early reasoning in practice. This study investigates the limits of method-level energy prediction in Java, examining whether static source code metrics complemented with method-level execution time can estimate the energy consumption of Java methods. We profile 2,786 Java methods to extract 33 static features and measure execution time and energy, then train and compare eleven regression models. Our findings show that static source code metrics alone yield poor predictive performance, with average R2 values close to zero. Incorporating execution time as a lightweight dynamic input significantly improves accuracy, raising R2 to as high as 0.46. Execution time, internal method calls, and cyclomatic complexity consistently emerge as the strongest predictors of energy consumption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑