如何估算ARM平台上的程序所消耗的能量? [英] How to give an estimation of the energy consumed by a program on an ARM platform?
问题描述
是否可以估算ARM CPU上的程序所消耗的能量?在嵌入式系统中,能耗是最重要的参数之一,我想知道程序员是否有可能知道运行该程序大约需要多少能量?
Is there a way to estimate the energy consumed by a program on an ARM CPU? In embedded systems, energy consumption is one of the most important parameters and I was wondering whether it is possible for a programmer to know approximately how much energy is needed to run the program?
例如,由于我在ARM CPU划分上执行了多个周期,因此我认为使用划分的代码将比没有划分代码的代码消耗更多的能量.但是这种调侃是很直观的,是否有更好的方法来量化执行代码时CPU消耗的能量?
For example, since on the ARM CPU division executed on multiple cycles I imagine that a code using divisions would consume more energy than a code that doesn't. But this reasing is quite intuitive, is there a better way to qulify the energy consumed by a CPU when executing a code?
推荐答案
Generally battery run systems have fuel gauges which are exposed through sysfs entries and can provide how much current is passing by. Think it like smart phone battery/charge indicator. Those are generally not that reliable and hard to correlate with exact time of application run, but may give you a rough estimate.
这篇关于如何估算ARM平台上的程序所消耗的能量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!