如何在Windows Mobile和Windows CE上测量应用程序的能耗? [英] How can I measure the energy consumption of my application on Windows Mobile and Windows CE?

查看:133
本文介绍了如何在Windows Mobile和Windows CE上测量应用程序的能耗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测量

  • 我自己的应用程序(可以修改)
  • 第三方应用程序(我无法修改)

  • Windows CE 5.0
  • Windows Mobile 5/6

是否有某种API?

如果没有,我可以测量可用于估算能耗的其他值吗?

If not, can I measure other values which I can use to estimate the energy consumption?

我不需要像20 mAh这样的精确值(尽管会很好),相对值就足够了,例如:从100%充电到0%充电状态,大约20%的充满电的电池由该应用程序使用"

I don't need an exact value like 20 mAh (although that would be nice) A relative value would suffice, like: "Starting from 100% to 0% charge status, around 20% of the fully charged battery was used by this application"

另一方面,非常重要的一点是该度量特定于单个应用程序,即我不希望为一组应用程序汇总度量,例如这三个应用程序一起消耗..."

On the other hand it is very important that the measurement is specific to a single application, i.e. I don't want aggregated measurements for a group of applications, like, "those three applications together consume ..."

推荐答案

有一个用于获取功耗信息的API,但是此API返回的信息的准确性取决于OEM(某些OEM不会在以下位置提供该信息)全部).有关此API的示例代码的更多信息,请访问 http://www.codeproject. com/kb/mobile/Wimopower1.aspx (以下示例程序的屏幕截图).从屏幕截图中可以看到,您可以知道电池的电压,电流,电池类型等.准确测量瞬时功耗需要外部硬件(我假设您不想进行任何硬件投资来进行测量).

There's an API for getting information on power consumption but the accuracy of the information returned by this API is OEM dependent (some OEMs don't make the information available at all). More information with example code on this API can be found at http://www.codeproject.com/kb/mobile/Wimopower1.aspx (screenshot of example programs below). As you can see from the screenshot you can tell the battery's voltage, current pull, the type of battery, and more. An accurate measure of instantanious power consumption requires external hardware (and I am assuming you don't want to make a hardware investment to make your measurements).

进行任何相对的测量,因为它们可能不代表您在其他设备上运行程序时所观察到的结果.

Take whatever measurements that you get to be relative as they may not be representative of what you would observe when running your program on a different device.

示例程序的屏幕截图http://www.codeproject.com/kb/mobile/WiMoPower1/TitleImage.png

这篇关于如何在Windows Mobile和Windows CE上测量应用程序的能耗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆