Couldn`t发现任何ActionScript原生API,即使在测试文档,我是正确的假设,这意味着测量CPU /内存消耗的唯一途径是通过炮制一个自定义的本地解决方案,AIR挂钩起来,使它每个目标平台上的工作?
Couldn`t find any ActionScript native APIs even in the beta documentation, am I right supposing that this means the only way to measure CPU / memory consumption is by cooking up a custom native solution, hooking it up with AIR and making it work on each targeted platform?
基本上,目的是为了能有可用的室内空气,而不是必须使用外部应用程序分析这些信息,甚至没有的Flex / Flash Builder中。
Basically the aim is to be able to have this information available inside AIR and not having to use an external application for profiling, not even Flex / Flash builder.
谢谢你的帮助的答案,System.totalMemory悄悄躲避我!
Thanks for the helpful answers, System.totalMemory sneakily eluded me!
似乎对CPU的负载唯一的解决办法将是一些命令行中使用的NativeProcess刮。
Seems for the CPU load the only solution will be some command line scraping using NativeProcess.
您可以测量内存消耗是这样的:
you can measure the memory consumption like this:
System.totalMemory
如果你谷歌AS3 FPS,你会发现很多网站讨论如何衡量实际的帧率。
if you google for "as3 fps" you will find a lot of sites discussing how to measure the actual framerate.
但我不认为你可以找到你的Flash应用程序的CPU消耗没有外界的帮助。
but i don't think you can find out the cpu consumption of your flash app without outside help.