无需物理设备即可检查 Android 应用程序的速度?

发布于 2024-08-23 03:37:27 字数 298 浏览 4 评论 0原文

我正在为 Android 编写游戏。我想定位尽可能多的设备。我知道 Droid 用户购买了大约 50% 的应用程序,其余的是 G1 和 HTC 设备的混合体。

到目前为止,我一直在模拟器中测试我的应用程序,以模拟 Droid 手机(我得到大约 40 fps)以及实际的 Droid 手机(我得到大约 60 fps)。

我想知道我的应用程序在 G1 等较慢的设备上运行的速度有多快。除了自己购买 G1 或请拥有 G1 的人帮我测试之外,还有其他方法可以做到这一点吗?

例如,有什么方法可以使用模拟器来大致了解它在 G1 上的运行情况吗?

I'm writing a game for Android. I'd like to target as many devices as possible. I'm aware that Droid owners buy about 50% of the apps and the rest are a mixture of G1 and HTC devices.

So far, I've been testing my app in the emulator set to model the Droid phone (where I get about 40 fps) as well as on an actual Droid phone (where I get about 60 fps).

I'd like to know how fast my app runs on slower devices such as the G1. Is there any way I can do this besides getting a G1 myself or asking people with G1s to test it for me?

For example, is there any way I can use the emulator to get a rough idea how well it will run on the G1?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陈甜 2024-08-30 03:37:27


除此之外我还有什么办法可以做到这一点
自己买G1或者问别人
用 G1 来帮我测试一下吗?

不是今天。

对于简单的“慢了 50%”的答案来说,变量太多。例如,DROID 具有浮点硬件 (FPU),而 G1 则没有。如果您正在进行大量浮点计算,DROID 和 G1 之间的差异将大于相对 CPU 速度所显示的差异。

类似地,板载闪存、图形硬件加速等的访问速度可能在与 CPU 速度无关的方面有所不同。而且,不同的应用程序会以不同的方式使用这些功能——您的应用程序可能全部从 RAM 运行,而其他应用程序则不断从板载闪存加载(或者更糟糕的是从 SD 卡加载,其速度差异更大)。

从性能角度来看,模拟器与真实硬件几乎没有相似之处。例如,根本没有图形硬件加速。使用模拟器测试你的游戏是否运行是一回事;用它来衡量性能对我来说似乎毫无意义。哎呀,我无法让模拟器在四核 PC 上可靠地播放视频。

现在,如果有一个工具可以测量您的应用程序使用某些功能(例如,某些 OpenGL 操作)的程度,以及不同设备在执行这些操作时如何执行的数据库,您也许能够得出一个相当准确的答案。唉,据我所知,这些都不存在。也许有一天它会存在,得益于众包数据库之类的东西。

在此期间,您将不得不做游戏开发人员在硬件不同的其他平台(例如 Windows)上所做的事情 - 在几个实际配置上进行测试并制定一些“最低”和“推荐”硬件水平。

Is
there any way I can do this besides
getting a G1 myself or asking people
with G1s to test it for me?

Not today.

There are too many variables for simple "it's 50% slower" answers. The DROID has floating-point hardware (FPU), and the G1 does not, for example. If you're doing lots of floating-point calculations, the disparity between the DROID and the G1 will be greater than the relative CPU speeds would indicate.

Similarly, access speeds for on-board flash, graphics hardware acceleration, and the like may all differ in ways that aren't tied to CPU speed. And, different apps will use those capabilities differently -- your app might run all from RAM while others are constantly loading from on-board flash (or, worse, from the SD card, which speeds vary even more widely).

The emulator bears little resemblance to real hardware from a performance standpoint. For example, there is no graphics hardware acceleration at all. Using the emulator to test whether your game works is one thing; using it to benchmark performance seems pointless to me. Heck, I can't get the emulator to play back video reliably on a quad-core PC.

Now, given a tool that can measure how much your app uses certain capabilities (e.g., certain OpenGL operations), and a database of how different devices perform when doing those things, you might be able to cook up a reasonably accurate answer. Alas, none of that exists, AFAIK. Perhaps someday it will exist, courtesy of a crowdsourced database or something.

In the interim, you are going to wind up having to do what game developers do on other platforms where the hardware varies (e.g., Windows) -- test on a couple of actual configurations and draw up some "minimum" and "recommended" hardware levels.

千秋岁 2024-08-30 03:37:27

您是否查看过Device Anywhere

Have you looked at Device Anywhere?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文